开发者

2D Graphics Transform - moving the origin

I have a vector graphics format that has its origin at the bottom left and i need to render it to an enh开发者_运维知识库anced metafile which has its origin at the top left. What is a transform to move between the two without flipping it upside down?


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...

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜