调整大小并旋转一个圆圈内的图像 [英] Resize and rotate a image within a circle

查看:84
本文介绍了调整大小并旋转一个圆圈内的图像的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

我想为下面制作一个程序

调整图像大小并在一个圆圈内旋转,关闭圆圈的中心,图像会变小
我已经花了几个星期了,但是我仍然不知道.

这个概念就是这样
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


这篇关于调整大小并旋转一个圆圈内的图像的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆