APIs for passing KIFONT::FONT pointers around.
Also some clean-up and bug fixes.
This commit is contained in:
@@ -377,7 +377,7 @@ void BRDITEMS_PLOTTER::PlotBoardGraphicItems()
|
||||
}
|
||||
|
||||
|
||||
void BRDITEMS_PLOTTER::PlotFootprintTextItem( const FP_TEXT* aTextMod, const COLOR4D& aColor )
|
||||
void BRDITEMS_PLOTTER::PlotFootprintTextItem( const FP_TEXT* aText, const COLOR4D& aColor )
|
||||
{
|
||||
COLOR4D color = aColor;
|
||||
|
||||
@@ -387,11 +387,11 @@ void BRDITEMS_PLOTTER::PlotFootprintTextItem( const FP_TEXT* aTextMod, const COL
|
||||
m_plotter->SetColor( color );
|
||||
|
||||
// calculate some text parameters :
|
||||
wxSize size = aTextMod->GetTextSize();
|
||||
wxPoint pos = aTextMod->GetTextPos();
|
||||
int thickness = aTextMod->GetEffectiveTextPenWidth();
|
||||
wxSize size = aText->GetTextSize();
|
||||
wxPoint pos = aText->GetTextPos();
|
||||
int thickness = aText->GetEffectiveTextPenWidth();
|
||||
|
||||
if( aTextMod->IsMirrored() )
|
||||
if( aText->IsMirrored() )
|
||||
size.x = -size.x; // Text is mirrored
|
||||
|
||||
// Non bold texts thickness is clamped at 1/6 char size by the low level draw function.
|
||||
@@ -402,18 +402,18 @@ void BRDITEMS_PLOTTER::PlotFootprintTextItem( const FP_TEXT* aTextMod, const COL
|
||||
|
||||
GBR_METADATA gbr_metadata;
|
||||
|
||||
if( IsCopperLayer( aTextMod->GetLayer() ) )
|
||||
if( IsCopperLayer( aText->GetLayer() ) )
|
||||
gbr_metadata.SetApertureAttrib( GBR_APERTURE_METADATA::GBR_APERTURE_ATTRIB_NONCONDUCTOR );
|
||||
|
||||
gbr_metadata.SetNetAttribType( GBR_NETLIST_METADATA::GBR_NETINFO_CMP );
|
||||
const FOOTPRINT* parent = static_cast<const FOOTPRINT*> ( aTextMod->GetParent() );
|
||||
const FOOTPRINT* parent = static_cast<const FOOTPRINT*> ( aText->GetParent() );
|
||||
gbr_metadata.SetCmpReference( parent->GetReference() );
|
||||
|
||||
m_plotter->SetCurrentLineWidth( thickness );
|
||||
|
||||
m_plotter->Text( pos, aColor, aTextMod->GetShownText(), aTextMod->GetDrawRotation(), size,
|
||||
aTextMod->GetHorizJustify(), aTextMod->GetVertJustify(), thickness,
|
||||
aTextMod->IsItalic(), allow_bold, false, &gbr_metadata );
|
||||
m_plotter->Text( pos, aColor, aText->GetShownText(), aText->GetDrawRotation(), size,
|
||||
aText->GetHorizJustify(), aText->GetVertJustify(), thickness,
|
||||
aText->IsItalic(), allow_bold, false, aText->GetFont(), &gbr_metadata );
|
||||
}
|
||||
|
||||
|
||||
@@ -783,14 +783,16 @@ void BRDITEMS_PLOTTER::PlotPcbText( const PCB_TEXT* aText )
|
||||
wxString& txt = strings_list.Item( ii );
|
||||
m_plotter->Text( positions[ii], color, txt, aText->GetTextAngle(), size,
|
||||
aText->GetHorizJustify(), aText->GetVertJustify(), thickness,
|
||||
aText->IsItalic(), allow_bold, false, &gbr_metadata );
|
||||
aText->IsItalic(), allow_bold, false, aText->GetFont(),
|
||||
&gbr_metadata );
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
m_plotter->Text( pos, color, shownText, aText->GetTextAngle(), size,
|
||||
aText->GetHorizJustify(), aText->GetVertJustify(), thickness,
|
||||
aText->IsItalic(), allow_bold, false, &gbr_metadata );
|
||||
aText->IsItalic(), allow_bold, false, aText->GetFont(),
|
||||
&gbr_metadata );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user