Sop*_*ert 133
如果您旋转点(px, py)周围点(ox, oy)的角度theta,你会得到:
p'x = cos(theta) * (px-ox) - sin(theta) * (py-oy) + ox p'y = sin(theta) * (px-ox) + cos(theta) * (py-oy) + oy
如果您使用GDI +来执行此操作,则可以使用Transform该Graphics对象的方法:
graphics.TranslateTransform(point of origin);
graphics.RotateTransform(rotation angle);
Run Code Online (Sandbox Code Playgroud)
然后绘制实际的东西.