summaryrefslogtreecommitdiff
path: root/gerbonara/cad/kicad/base_types.py
diff options
context:
space:
mode:
authorjaseg <git@jaseg.de>2023-07-21 17:56:24 +0200
committerjaseg <git@jaseg.de>2023-07-21 17:56:24 +0200
commit91b99a04523e7efb37dab0a5b9378c1c5a230b74 (patch)
tree37efbe927c5798b5279e5b4e3791d4ff65948d71 /gerbonara/cad/kicad/base_types.py
parent09c9d2672878f4099ba874f495cd4f76c919f07e (diff)
downloadgerbonara-91b99a04523e7efb37dab0a5b9378c1c5a230b74.tar.gz
gerbonara-91b99a04523e7efb37dab0a5b9378c1c5a230b74.tar.bz2
gerbonara-91b99a04523e7efb37dab0a5b9378c1c5a230b74.zip
WIP
Diffstat (limited to 'gerbonara/cad/kicad/base_types.py')
-rw-r--r--gerbonara/cad/kicad/base_types.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/gerbonara/cad/kicad/base_types.py b/gerbonara/cad/kicad/base_types.py
index 8243c07..6c0526f 100644
--- a/gerbonara/cad/kicad/base_types.py
+++ b/gerbonara/cad/kicad/base_types.py
@@ -333,6 +333,10 @@ class TextMixin:
def h_align(self):
return 'left' if self.effects.justify.h else 'center'
+ @property
+ def mirrored(self):
+ return False, False
+
def to_svg(self, color='black', variables={}):
if not self.effects or self.effects.hide or not self.effects.font:
return
@@ -344,12 +348,13 @@ class TextMixin:
print(text, self.rotation, self.at, self.effects)
yield font.render_svg(text,
size=self.size or 1.27,
- rotation=self.rotation,
h_align=self.h_align,
v_align=self.effects.justify.v or self.default_v_align,
stroke=color,
stroke_width=f'{self.line_width:.3f}',
scale=(1,1),
+ rotation=self.rotation,
+ mirror=self.mirrored,
transform=f'translate({self.at.x:.3f} {self.at.y:.3f})',
)