假设我在 postscript 中有一个方形对象。如何以正方形中心为引用角度而不是以正方形左下角为引用角度旋转正方形?
最佳答案
假设您的正方形仍然是从左下角绘制的,那么 Ken 的评论给出了总体思路,但您还需要在旋转后撤消平移。
/Sq {0 0 moveto 0 100 lineto 100 100 lineto 100 0 lineto closepath} def
gsave
50 50 translate
45 rotate
-50 -50 translate
Sq stroke
grestore
关于postscript - 以对象中心为引用在 Postscript 中旋转,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35644016/