后记:发现旋转/刻度值 [英] Postscript: discover rotate/scale value

查看:73
本文介绍了后记:发现旋转/刻度值的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何找到旋转/缩放值?例如,发出以下命令后:

How can I discover the values of rotate/scale? For example, after I issue the following command:

90 rotate

当前旋转设置为90。如何发现旋转设置为?

the current rotation is set to 90. How do I discover what rotate is set to?

推荐答案

旋转(也包括缩放和剪切)没有单独的值。所有这些转换都汇总到当前转换矩阵(CTM)中。

Rotation (also scaling and shearing) do not have individual values. All such transformations are rolled up into the Current Transformation Matrix (CTM).

您可以在《 PostScript语言参考手册》(尤其是第4.3.1至4.3.3节)中找到有关CTM和转换的出色说明。由于CTM是所有绘图操作的基础,因此对于PostScript,这是一个重要的领域。

You can find an excellent description of the CTM and the transformations in the PostScript Language Reference Manual, especially sections 4.3.1 to 4.3.3. Its an important area to understand for PostScript as the CTM underpins all drawing operations. Its really too complex to explain in this forum I think.

简短的答案是,没有简单的解决方案,您必须做一些矩阵代数才能找出要点在哪里。

The short answer is that there is no simple solution, you have to do some matrix algebra to find out where points map to. A common trick is to pass the co-ordinates of the unit square through the CTM (points 0,0 and 1,1) and see where the transformed points end up.

这篇关于后记:发现旋转/刻度值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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