public x,y. bugfix when w~=h