开发者

Silverlight Transforms Images C#

I have an image on which I may use a ScaleTransform to increase the image size by 25%. I also have a rectangle which sits on top of the image开发者_C百科 highlighting a particular area. When I scale the image I want the rectangle to scale as well and highlight the same area as before. Scaling the rectangle itself isn't the issue, it's getting the rectangle into the correct position so that it highlights the same area. How do I do this? Is there a mathematical formula of some description that can be used to calculate its correct position?


Apply the same scaling factor to the X and Y offsets of the rectangle.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜