Skip to content

Commit

Permalink
v7 Thickness - > TextThickness
Browse files Browse the repository at this point in the history
  • Loading branch information
atait committed Jan 8, 2024
1 parent 2c87213 commit d647cab
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions kicad/pcbnew/drawing.py
Original file line number Diff line number Diff line change
Expand Up @@ -385,7 +385,8 @@ def contains(self, point):


class TextPCB(Drawing):
def __init__(self, position, text=None, layer='F.SilkS', size=1.0, thickness=0.15, board=None):
def __init__(self, position, text=None, layer='F.SilkS',
size=1.0, thickness=0.15, board=None):
self._obj = SWIGtype.Text(board and board.native_obj)
self.position = position
if text:
Expand All @@ -404,11 +405,17 @@ def text(self, value):

@property
def thickness(self):
return float(self._obj.GetThickness()) / units.DEFAULT_UNIT_IUS
if SWIG_version >= 7:
return float(self._obj.GetTextThickness()) / units.DEFAULT_UNIT_IUS
else:
return float(self._obj.GetThickness()) / units.DEFAULT_UNIT_IUS

@thickness.setter
def thickness(self, value):
return self._obj.SetThickness(int(value * units.DEFAULT_UNIT_IUS))
if SWIG_version >= 7:
return self._obj.SetTextThickness(int(value * units.DEFAULT_UNIT_IUS))
else:
return self._obj.SetThickness(int(value * units.DEFAULT_UNIT_IUS))

@property
def size(self):
Expand Down

0 comments on commit d647cab

Please sign in to comment.