diff options
author | David Lamparter <equinox@diac24.net> | 2013-12-15 23:41:24 +0100 |
---|---|---|
committer | David Lamparter <equinox@diac24.net> | 2013-12-15 23:41:24 +0100 |
commit | 1e5074b52e4bb29c9cc1574929d9e8c681b2ae0e (patch) | |
tree | 7ddf10eab97543795437807c9e7826847b7ca334 /ptlayout.py | |
parent | 0516ad0b6adc3f53e62746177788ac79f1b1ada2 (diff) |
improve text layout stuff
Diffstat (limited to 'ptlayout.py')
-rw-r--r-- | ptlayout.py | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/ptlayout.py b/ptlayout.py index 0850c62..2ead50c 100644 --- a/ptlayout.py +++ b/ptlayout.py @@ -58,14 +58,19 @@ class PTLText(PTLayoutElem): w = size[0] matrix = cctx.get_matrix() - if self.mode == 'left': + if self.mode == 'right': cctx.rotate(90. * pi / 180.) cctx.translate((h - size[0]) / 2, -size[1]) w = size[1] - elif self.mode == 'right': + elif self.mode == 'left': cctx.rotate(-90. * pi / 180.) cctx.translate(-h + (h - size[0]) / 2, 0) w = size[1] + elif self.mode == 'down': + cctx.rotate(pi) + cctx.translate(-size[0], -(h + size[1]) / 2) + else: + cctx.translate(0, (h - size[1]) / 2) pctx.update_layout(layout) pctx.show_layout(layout) |