diff options
author | jaseg <git@jaseg.de> | 2023-07-22 12:40:34 +0200 |
---|---|---|
committer | jaseg <git@jaseg.de> | 2023-07-22 12:40:34 +0200 |
commit | 6e7337cca5bfc25919804face64998d16088148c (patch) | |
tree | 999eff72bbccc0b2abf517c0dfb14a5202b73709 /gerbonara/cad | |
parent | eb20595e00bdc59daa31392eaca559ab36f59a5c (diff) | |
download | gerbonara-6e7337cca5bfc25919804face64998d16088148c.tar.gz gerbonara-6e7337cca5bfc25919804face64998d16088148c.tar.bz2 gerbonara-6e7337cca5bfc25919804face64998d16088148c.zip |
Rendering looks pretty good
Diffstat (limited to 'gerbonara/cad')
-rw-r--r-- | gerbonara/cad/kicad/base_types.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/gerbonara/cad/kicad/base_types.py b/gerbonara/cad/kicad/base_types.py index 518200d..001138c 100644 --- a/gerbonara/cad/kicad/base_types.py +++ b/gerbonara/cad/kicad/base_types.py @@ -348,6 +348,7 @@ class TextMixin: h_align = self.h_align mx, my = self.mirrored if rot in (90, 270): + h_align = {'left': 'right', 'right': 'left'}.get(h_align, h_align) rot = (rot+180)%360 elif rot == 180: rot = 0 @@ -359,6 +360,12 @@ class TextMixin: if mx and rot in (90, 270): h_align = {'left': 'right', 'right': 'left'}.get(h_align, h_align) rot = (rot+180)%360 + if rot == 180: + rot = 0 + h_align = {'left': 'right', 'right': 'left'}.get(h_align, h_align) + if rot == 90: + rot = 270 + h_align = {'left': 'right', 'right': 'left'}.get(h_align, h_align) yield font.render_svg(text, size=self.size or 1.27, |