I do have rectangle, which had information about topx, topy, width and height.
I want to scale this rectangle based on an origin other than top-left. Is there already existing algo to do that ?
Currently I work on Eclipse GEF & SWT. In GEF, the all rectangle operations are assumed that top-left is where the drawing starts and they scale/resize from top-left. But I want to do scale/resize from center.
eg : my rectangle have info like {100,100,50,50}. If I do scaling of 1.5 in both x&y from top-left I'll get the resultant rectangle as {100,100,100,100} ( First two are x,y and rest are width,height).
Thanks J