Da dove ricavi le variabili myWidth e myHeight

Secondo logica dovresti usare i parametri w e h che passi...

ciao