【发布时间】:2011-08-18 09:29:58
【问题描述】:
我有一个方法是绘制一个多边形,然后将该多边形向右旋转 90 度,使其原来的顶点现在指向右侧。
这是绘制多边形(三角形)的代码,但我不知道如何旋转它。
Point[] points = new Point[3];
points[0] = new Point((int)top, (int)top);
points[1] = new Point((int)top - WIDTH / 2, (int)top + HEIGHT);
points[2] = new Point((int)top + WIDTH / 2, (int)top + HEIGHT);
paper.FillPolygon(normalBrush, points);
提前致谢。
【问题讨论】:
-
您要旋转多边形本身还是只旋转绘制它?
-
你应该使用三角函数,基本上它是在正确的时间应用一些sin,cos