|
This is more of a math problem but I think someone may be able to help. I am using the graphicsPath.Warp method to manipulate a rectangle. Using the warp method I am able to move each point of the rectangle to any xy coordinates I wish.
What I am attempting to do is set one of the points as an anchor and move the other 3 while still keeping the rectangle in proportion. The effect will be similar to that found in many drawing packages when resizing.
Say for example I was stretching the rectangle to the right. I would need to calculate the correct amount of pixels to add onto each of the points x coordinate (apart from the anchored point). I cannot simply add the same amount of pixels to each point because the rectangle will become distorted.
|