PDFsharp 改变原点

PDFsharp Change Origin

我正在使用 PDFsharp to draw lines of a fairly complex shape. To simplify this process and make it more comprehendable, I would like to change the origin from the top left corner of the page to the bottom left. Currently, changing the origin is not yet implemented。有没有办法可以使用 RotateTransformTranslateTransform 或其他方法将原点重新定位到左下角?据我所知,旋转变换围绕原点旋转。可能有一个我不知道的把戏。使用

gfx.RotateTransform(180);
gfx.TranslateTransform(-612, -792); // Assumes 8.5 inch x 11 inch at 72 points/inch

我可以将它移到右下角,这样 x 向左增加,但添加的文本是颠倒的。

有没有办法真正将原点移到左下角,使 y 向上增加,x 向右增加?提前致谢。

编辑: ThomasH 的回答将原点移到了左下角,但文本仍然翻转。有没有办法克服这个问题?请参阅此处的自包含示例:http://pastebin.com/fgfjDXF1

TranslateTransformScaleTransform(1,-1) 的组合应该可以满足您的需求。