diff options
Diffstat (limited to 'gerbonara/cad/kicad/base_types.py')
-rw-r--r-- | gerbonara/cad/kicad/base_types.py | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/gerbonara/cad/kicad/base_types.py b/gerbonara/cad/kicad/base_types.py index d29586e..3d0b0c4 100644 --- a/gerbonara/cad/kicad/base_types.py +++ b/gerbonara/cad/kicad/base_types.py @@ -270,6 +270,20 @@ class Justify: v: AtomChoice(Atom.top, Atom.bottom) = None mirror: Flag() = False + @property + def h_str(self): + if self.h is None: + return 'center' + else: + return str(self.h) + + @property + def v_str(self): + if self.v is None: + return 'middle' + else: + return str(self.v) + @sexp_type('effects') class TextEffect: @@ -277,6 +291,7 @@ class TextEffect: hide: Flag() = False justify: OmitDefault(Justify) = field(default_factory=Justify) + class TextMixin: @property def size(self): |