Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

move a rect given a new center position to it..

I seem to have a simple problem that i am not capable of solving.

I am trying to move a already existing Rect to a new position. I would have thought that this would be possible by just changing is tl() and br() parameter, but it does seem like it, since doing so doesn't change it at all.. ??

How do i move the rect such that it's center position is the coordinate i give it. about the width and the height doesn't need to be changed.