2D 图形变换 - 移动原点
我有一个矢量图形格式,其原点位于左下角,我需要将其渲染为增强型图元文件,其原点位于左上方。在两者之间移动而又不颠倒的变换是什么?
I have a vector graphics format that has its origin at the bottom left and i need to render it to an enhanced metafile which has its origin at the top left. What is a transform to move between the two without flipping it upside down?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我可能完全误解了你的问题,但这里是:创建一个从旧原点到新原点的向量(指向上方的向量),然后从文件中的所有点中减去该向量。
如果您想将其作为变换来执行,则需要一个 3 x 3 矩阵,如下所示:
1 0 0
0 1 -T
0 0 1
其中“T”是从上到下所需的翻译..
希望这对您有用...
I may have misunderstood your question completely, but here goes: Create a vector from the old origin to the new origin (a vector pointing upwards) and subtract that from all points in the file.
If you want to do this as a transform, you need a 3 by 3 matrix like the following:
1 0 0
0 1 -T
0 0 1
Where "T" is the translation required from top to bottom..
hope thats usefull to you...