如何从基本矩形中绘制旋转矩形? [英] How can I draw a rotate rectangle from my base rectangle?

查看:194
本文介绍了如何从基本矩形中绘制旋转矩形?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

请帮助我

我有一个4个名字的矩形4点。

左上角是a,右上角是b,

左下角是c,右下角是d。(没有必要在表格中显示这些名字)我的形式中有这个矩形,现在我想要绘制另一个矩形旋转我的第一个矩形,我的意思是最后我的形状应该有2个矩形。

请用旋转命令编写完整的代码,谢谢。

解决方案

请参阅我对该问题的评论并相应澄清。但是,因为你最有可能在谈论 System.Drawing ,这就是你需要的:

http://msdn.microsoft.com/en-us/library/system .drawing.graphics.transform%28v = vs.110%29.aspx [ ^ ],

http://msdn.microsoft.com/en-us/library/system.drawing.drawing2d.matrix %28v = vs.110%29.aspx [ ^ ](特别参见旋转方法),

http://en.wikipedia.org/wiki/Rotation_matrix [ ^ ]。



< DD> -SA

Please help me
I have a rectangle with 4 names for 4 points.
Top left point is a,Top right point is b,
Bottom left point is c,Bottom right point is d.(it's not necessary to show these names in the form)I have this rectangle in my form,Now I want to draw another rectangle by rotating my first rectangle,I mean finally I should have 2 rectangles in my form.
please write the complete code with rotating commands,thanks.

解决方案

Please see my comment to the question and clarify accordingly. However, as it's most likely that you are talking about System.Drawing, this is what you would need:
http://msdn.microsoft.com/en-us/library/system.drawing.graphics.transform%28v=vs.110%29.aspx[^],
http://msdn.microsoft.com/en-us/library/system.drawing.drawing2d.matrix%28v=vs.110%29.aspx[^] (in particular, see Rotate methods),
http://en.wikipedia.org/wiki/Rotation_matrix[^].

—SA


这篇关于如何从基本矩形中绘制旋转矩形?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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