Make FootprintWizardBase.py compatible with last changes in EDA_TEXT.

This commit is contained in:
jean-pierre charras 2017-01-26 20:19:20 +01:00
parent 2f0ab8b13d
commit c761d30ade
2 changed files with 8 additions and 7 deletions

View File

@ -76,7 +76,8 @@ class FPC_FootprintWizard(FootprintWizardBase.FootprintWizard):
# Gives a position and size to ref and value texts:
textposy = pad_height/2 + pcbnew.FromMM(1) + self.GetTextThickness()
self.draw.Reference( 0, textposy, size_text )
angle_degree = 0.0
self.draw.Reference( 0, textposy, size_text, angle_degree )
textposy = textposy + size_text + self.GetTextThickness()
self.draw.Value( 0, textposy, size_text )

View File

@ -530,10 +530,10 @@ class FootprintWizardDrawingAids:
text_size = pcbnew.wxSize(size, size)
self.module.Reference().SetPos0(self.TransformPoint(x, y))
self.module.Reference().SetTextPosition(
self.module.Reference().SetPosition(
self.module.Reference().GetPos0())
self.module.Reference().SetSize(text_size)
self.module.Reference().SetOrientation(orientation_degree*10) # internal angles are in 0.1 deg
self.module.Reference().SetTextSize(text_size)
self.module.Reference().SetTextAngle(orientation_degree*10) # internal angles are in 0.1 deg
def Value(self, x, y, size, orientation_degree = 0):
"""
@ -542,10 +542,10 @@ class FootprintWizardDrawingAids:
text_size = pcbnew.wxSize(size, size)
self.module.Value().SetPos0(self.TransformPoint(x, y))
self.module.Value().SetTextPosition(self.module.Value().GetPos0())
self.module.Value().SetSize(text_size)
self.module.Value().SetPosition(self.module.Value().GetPos0())
self.module.Value().SetTextSize(text_size)
self.module.Value().SetLayer(self.DefaultTextValueLayer())
self.module.Value().SetOrientation(orientation_degree*10) # internal angles are in 0.1 deg
self.module.Value().SetTextAngle(orientation_degree*10) # internal angles are in 0.1 deg
def Box(self, x, y, w, h):
"""