在图片框中旋转图像 [英] Rotate image in picture box

查看:66
本文介绍了在图片框中旋转图像的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

HI ALL



我的照片框中有一张图片我希望图片根据用户点击进行旋转。



请提供您的反馈。



Rgds

Jagdesh

HI ALL

I had a image in my picture box i want the image to rotate based on User Click.

Kindly provide your Feedback.

Rgds
Jagdesh

推荐答案

首先,不要使用 PictureBox 。请看我过去的答案:

如何从旧图纸中清除面板 [ ^ ],

在C#中绘制一个矩形 [ ^ ],

在图片框中附加图片 [ ^ ]。



旋转任何东西都很简单。您需要使用 System.Drawing.Graphics.Transform 。请参阅:

http://msdn.microsoft .com / zh-cn / library / system.drawing.graphics.transform.aspx [ ^ ],

http://msdn.microsoft.com/en-us/library/system.drawing.drawing2d.matrix.aspx [ ^ ]。



-SA
First of all, don''t use PictureBox. Please see my past answers:
How do I clear a panel from old drawing[^],
draw a rectangle in C#[^],
Append a picture within picturebox[^].

Rotation of anything is really easy. You need to use System.Drawing.Graphics.Transform. Please see:
http://msdn.microsoft.com/en-us/library/system.drawing.graphics.transform.aspx[^],
http://msdn.microsoft.com/en-us/library/system.drawing.drawing2d.matrix.aspx[^].

—SA


这篇关于在图片框中旋转图像的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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