Lazy context handling for SVG plotting.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/15325
This commit is contained in:
Jeff Young
2023-08-07 14:01:58 +01:00
parent 256c7fa788
commit f43b90b15f
7 changed files with 35 additions and 50 deletions
+1 -15
View File
@@ -178,20 +178,13 @@ void PSLIKE_PLOTTER::FlashPadRoundRect( const VECTOR2I& aPadPos, const VECTOR2I&
int aCornerRadius, const EDA_ANGLE& aOrient,
OUTLINE_MODE aTraceMode, void* aData )
{
VECTOR2I size( aSize );
if( aTraceMode == FILLED )
{
SetCurrentLineWidth( 0 );
}
else
{
SetCurrentLineWidth( USE_DEFAULT_LINE_WIDTH );
}
SHAPE_POLY_SET outline;
TransformRoundChamferedRectToPolygon( outline, aPadPos, size, aOrient, aCornerRadius, 0.0, 0,
TransformRoundChamferedRectToPolygon( outline, aPadPos, aSize, aOrient, aCornerRadius, 0.0, 0,
0, GetPlotterArcHighDef(), ERROR_INSIDE );
std::vector<VECTOR2I> cornerList;
@@ -215,17 +208,10 @@ void PSLIKE_PLOTTER::FlashPadCustom( const VECTOR2I& aPadPos, const VECTOR2I& aS
const EDA_ANGLE& aOrient, SHAPE_POLY_SET* aPolygons,
OUTLINE_MODE aTraceMode, void* aData )
{
VECTOR2I size( aSize );
if( aTraceMode == FILLED )
{
SetCurrentLineWidth( 0 );
}
else
{
SetCurrentLineWidth( USE_DEFAULT_LINE_WIDTH );
}
std::vector<VECTOR2I> cornerList;