调整大小并旋转一个圆圈内的图像
问题描述:
大家好,
我想为下面制作一个程序
调整图像大小并在一个圆圈内旋转,关闭圆圈的中心,图像会变小
我已经花了几个星期了,但是我仍然不知道.
这个概念就是这样
http://i26.tinypic.com/1fy539.jpg [
Hi all,
I would like to make a program for below
The image is resize and rotate within a circle, closing the center of a circlet the image will smaller
I spent few weeks for these already, but i still haven’t idea on it.
The concept is like this
http://i26.tinypic.com/1fy539.jpg[^]
[edit]Link linkified - OriginalGriff[/edit]
答
我不会为您提供完整的代码-我没有时间实施整个测试过程,因为我做了这样的事情已经有一段时间了.我不想敲一个不起作用的例子...:笑:
但是,这实际上非常简单-您所需要做的就是在Paint事件中,将适当的转换应用于提供的Graphics对象. MSDN应该通过一些玩法向您展示如何: Graphics.RotateTransform [^ ]和 Graphics.ScaleTransform [
I''m not going to give you the entire code - I don''t have time to implement the whole thing for testing, and it''s been a while since I did anything like this. I don''t want to bang out an example that doesn''t work...:laugh:
However, it''s actually pretty simple - all you need to do is in your Paint event, apply the appropriate transforms to the supplied Graphics object. MSDN should show you how, with a bit of playing: Graphics.RotateTransform[^] and Graphics.ScaleTransform[^]
If I remember correctly, you should find it is just a case of calling the simplest version of each, once in each Paint event. You may need to play with the order because the transforms are cumulative, IIRC