[Worksheet][KiCad 7] Adapted for the new VECTOR2I

This commit is contained in:
Salvador E. Tropea 2023-02-13 11:19:42 -03:00
parent 09e38b47c9
commit e2cb506094
1 changed files with 4 additions and 4 deletions

View File

@ -170,8 +170,8 @@ class WksLine(WksDrawing):
def draw_line(e, p, st, en):
s = PCB_SHAPE()
s.SetShape(e.shape)
s.SetStart(st)
s.SetEnd(en)
s.SetStart(GS.p2v_k7(st))
s.SetEnd(GS.p2v_k7(en))
s.SetWidth(e.line_width)
s.SetLayer(p.layer)
p.board.Add(s)
@ -298,8 +298,8 @@ class WksText(WksDrawing):
for _ in range(e.repeat):
s = PCB_TEXT(None)
s.SetText(text)
s.SetPosition(pos)
s.SetTextSize(e.font.size)
s.SetPosition(GS.p2v_k7(pos))
s.SetTextSize(GS.p2v_k7(e.font.size))
if e.font.bold:
s.SetBold(True)
thickness = round(e.font.line_width*2)