plotters rework: add plot fct to use TEXT_ATTRIBUTES class to pass text settings

Old PLOTTER::Text is not (yet) removed, but it use negative text size
to mirrored text, which is not really compatible with some plotters (especially PDF).
Using TEXT_ATTRIBUTES is much easy and much better,
so PLOTTER::PlotText() is added.
Note: "old" PLOTTER::Text() is not removed yet.
This commit is contained in:
jean-pierre charras
2023-02-26 14:44:53 +01:00
parent 551773bf17
commit 51d46c0e73
20 changed files with 451 additions and 213 deletions
+14
View File
@@ -2004,6 +2004,20 @@ void GERBER_PLOTTER::Text( const VECTOR2I& aPos,
}
void GERBER_PLOTTER::PlotText( const VECTOR2I& aPos, const COLOR4D& aColor,
const wxString& aText,
const TEXT_ATTRIBUTES& aAttributes,
KIFONT::FONT* aFont,
void* aData )
{
GBR_METADATA* gbr_metadata = static_cast<GBR_METADATA*>( aData );
if( gbr_metadata )
formatNetAttribute( &gbr_metadata->m_NetlistMetadata );
PLOTTER::PlotText( aPos, aColor, aText, aAttributes, aFont, aData );
}
void GERBER_PLOTTER::SetLayerPolarity( bool aPositive )
{
if( aPositive )