diff options
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) |