MCPcopy Create free account
hub / github.com/KiCad/kicad-source-mirror / SetCurrentLineWidth

Method SetCurrentLineWidth

common/plotters/PS_plotter.cpp:381–398  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

379
380
381void PS_PLOTTER::SetCurrentLineWidth( int aWidth, void* aData )
382{
383 wxASSERT( m_outputFile );
384
385 if( aWidth == DO_NOT_SET_LINE_WIDTH )
386 return;
387 else if( aWidth == USE_DEFAULT_LINE_WIDTH )
388 aWidth = m_renderSettings->GetDefaultPenWidth();
389 else if( aWidth == 0 )
390 aWidth = 1;
391
392 wxASSERT_MSG( aWidth > 0, "Plotter called to set negative pen width" );
393
394 if( aWidth != GetCurrentLineWidth() )
395 fmt::print( m_outputFile, "{:g} setlinewidth\n", userToDeviceSize( aWidth ) );
396
397 m_currentPenWidth = aWidth;
398}
399
400
401void PS_PLOTTER::emitSetRGBColor( double r, double g, double b, double a )

Callers 15

PlotImageMethod · 0.45
PlotDrawingSheetFunction · 0.45
PlotMethod · 0.45
PlotMethod · 0.45
PlotMethod · 0.45
PlotPinTypeMethod · 0.45
PlotPinTextsMethod · 0.45
PlotMethod · 0.45
PlotMethod · 0.45
PlotMethod · 0.45
PlotMethod · 0.45
PlotMethod · 0.45

Calls 1

GetDefaultPenWidthMethod · 0.80

Tested by

no test coverage detected