diff --git a/common/eda_text.cpp b/common/eda_text.cpp index d9faf34fe1..9127f591b3 100644 --- a/common/eda_text.cpp +++ b/common/eda_text.cpp @@ -400,7 +400,7 @@ bool EDA_TEXT::TextHitTest( const EDA_RECT& aRect, bool aContains, int aAccuracy void EDA_TEXT::Print( RENDER_SETTINGS* aSettings, const wxPoint& aOffset, COLOR4D aColor, - EDA_DRAW_MODE_T aFillMode ) + PLOT_MODE aFillMode ) { if( IsMultilineAllowed() ) { @@ -464,7 +464,7 @@ void EDA_TEXT::GetLinePositions( std::vector& aPositions, int aLineCoun } void EDA_TEXT::printOneLineOfText( RENDER_SETTINGS* aSettings, const wxPoint& aOffset, - COLOR4D aColor, EDA_DRAW_MODE_T aFillMode, + COLOR4D aColor, PLOT_MODE aFillMode, const wxString& aText, const wxPoint &aPos ) { wxDC* DC = aSettings->GetPrintDC(); diff --git a/common/plotters/DXF_plotter.cpp b/common/plotters/DXF_plotter.cpp index e5cc94d534..ad1343b17d 100644 --- a/common/plotters/DXF_plotter.cpp +++ b/common/plotters/DXF_plotter.cpp @@ -614,7 +614,7 @@ void DXF_PLOTTER::SetDash( PLOT_DASH_TYPE aDashed ) void DXF_PLOTTER::ThickSegment( const wxPoint& aStart, const wxPoint& aEnd, int aWidth, - EDA_DRAW_MODE_T aPlotMode, void* aData ) + PLOT_MODE aPlotMode, void* aData ) { if( aPlotMode == SKETCH ) { @@ -676,7 +676,7 @@ void DXF_PLOTTER::Arc( const wxPoint& centre, double StAngle, double EndAngle, i * DXF oval pad: always done in sketch mode */ void DXF_PLOTTER::FlashPadOval( const wxPoint& pos, const wxSize& aSize, double orient, - EDA_DRAW_MODE_T trace_mode, void* aData ) + PLOT_MODE trace_mode, void* aData ) { wxASSERT( outputFile ); wxSize size( aSize ); @@ -698,7 +698,7 @@ void DXF_PLOTTER::FlashPadOval( const wxPoint& pos, const wxSize& aSize, double * pretty if other kinds of pad aren't... */ void DXF_PLOTTER::FlashPadCircle( const wxPoint& pos, int diametre, - EDA_DRAW_MODE_T trace_mode, void* aData ) + PLOT_MODE trace_mode, void* aData ) { wxASSERT( outputFile ); Circle( pos, diametre, FILL_TYPE::NO_FILL ); @@ -709,7 +709,7 @@ void DXF_PLOTTER::FlashPadCircle( const wxPoint& pos, int diametre, * DXF rectangular pad: alwayd done in sketch mode */ void DXF_PLOTTER::FlashPadRect( const wxPoint& pos, const wxSize& padsize, - double orient, EDA_DRAW_MODE_T trace_mode, void* aData ) + double orient, PLOT_MODE trace_mode, void* aData ) { wxASSERT( outputFile ); wxSize size; @@ -774,7 +774,7 @@ void DXF_PLOTTER::FlashPadRect( const wxPoint& pos, const wxSize& padsize, void DXF_PLOTTER::FlashPadRoundRect( const wxPoint& aPadPos, const wxSize& aSize, int aCornerRadius, double aOrient, - EDA_DRAW_MODE_T aTraceMode, void* aData ) + PLOT_MODE aTraceMode, void* aData ) { SHAPE_POLY_SET outline; TransformRoundChamferedRectToPolygon( outline, aPadPos, aSize, aOrient, @@ -793,7 +793,7 @@ void DXF_PLOTTER::FlashPadRoundRect( const wxPoint& aPadPos, const wxSize& aSize void DXF_PLOTTER::FlashPadCustom( const wxPoint& aPadPos, const wxSize& aSize, SHAPE_POLY_SET* aPolygons, - EDA_DRAW_MODE_T aTraceMode, void* aData ) + PLOT_MODE aTraceMode, void* aData ) { for( int cnt = 0; cnt < aPolygons->OutlineCount(); ++cnt ) { @@ -813,7 +813,7 @@ void DXF_PLOTTER::FlashPadCustom( const wxPoint& aPadPos, const wxSize& aSize, * DXF trapezoidal pad: only sketch mode is supported */ void DXF_PLOTTER::FlashPadTrapez( const wxPoint& aPadPos, const wxPoint *aCorners, - double aPadOrient, EDA_DRAW_MODE_T aTrace_Mode, void* aData ) + double aPadOrient, PLOT_MODE aTrace_Mode, void* aData ) { wxASSERT( outputFile ); wxPoint coord[4]; /* coord actual corners of a trapezoidal trace */ @@ -836,7 +836,7 @@ void DXF_PLOTTER::FlashPadTrapez( const wxPoint& aPadPos, const wxPoint *aCorner void DXF_PLOTTER::FlashRegularPolygon( const wxPoint& aShapePos, int aRadius, int aCornerCount, - double aOrient, EDA_DRAW_MODE_T aTraceMode, void* aData ) + double aOrient, PLOT_MODE aTraceMode, void* aData ) { // Do nothing wxASSERT( 0 ); diff --git a/common/plotters/GERBER_plotter.cpp b/common/plotters/GERBER_plotter.cpp index 93bb327e34..fa3995df7f 100644 --- a/common/plotters/GERBER_plotter.cpp +++ b/common/plotters/GERBER_plotter.cpp @@ -907,7 +907,7 @@ void GERBER_PLOTTER::PlotPoly( const std::vector< wxPoint >& aCornerList, void GERBER_PLOTTER::ThickSegment( const wxPoint& start, const wxPoint& end, int width, - EDA_DRAW_MODE_T tracemode, void* aData ) + PLOT_MODE tracemode, void* aData ) { if( tracemode == FILLED ) { @@ -928,7 +928,7 @@ void GERBER_PLOTTER::ThickSegment( const wxPoint& start, const wxPoint& end, int } void GERBER_PLOTTER::ThickArc( const wxPoint& centre, double StAngle, double EndAngle, - int radius, int width, EDA_DRAW_MODE_T tracemode, void* aData ) + int radius, int width, PLOT_MODE tracemode, void* aData ) { GBR_METADATA *gbr_metadata = static_cast( aData ); SetCurrentLineWidth( width, gbr_metadata ); @@ -951,7 +951,7 @@ void GERBER_PLOTTER::ThickArc( const wxPoint& centre, double StAngle, double End void GERBER_PLOTTER::ThickRect( const wxPoint& p1, const wxPoint& p2, int width, - EDA_DRAW_MODE_T tracemode, void* aData ) + PLOT_MODE tracemode, void* aData ) { GBR_METADATA *gbr_metadata = static_cast( aData ); SetCurrentLineWidth( width, gbr_metadata ); @@ -979,7 +979,7 @@ void GERBER_PLOTTER::ThickRect( const wxPoint& p1, const wxPoint& p2, int width, void GERBER_PLOTTER::ThickCircle( const wxPoint& pos, int diametre, int width, - EDA_DRAW_MODE_T tracemode, void* aData ) + PLOT_MODE tracemode, void* aData ) { GBR_METADATA *gbr_metadata = static_cast( aData ); SetCurrentLineWidth( width, gbr_metadata ); @@ -1001,7 +1001,7 @@ void GERBER_PLOTTER::ThickCircle( const wxPoint& pos, int diametre, int width, void GERBER_PLOTTER::FilledCircle( const wxPoint& pos, int diametre, - EDA_DRAW_MODE_T tracemode, void* aData ) + PLOT_MODE tracemode, void* aData ) { // A filled circle is a graphic item, not a pad. // So it is drawn, not flashed. @@ -1025,7 +1025,7 @@ void GERBER_PLOTTER::FilledCircle( const wxPoint& pos, int diametre, } -void GERBER_PLOTTER::FlashPadCircle( const wxPoint& pos, int diametre, EDA_DRAW_MODE_T trace_mode, void* aData ) +void GERBER_PLOTTER::FlashPadCircle( const wxPoint& pos, int diametre, PLOT_MODE trace_mode, void* aData ) { wxSize size( diametre, diametre ); GBR_METADATA* gbr_metadata = static_cast( aData ); @@ -1055,7 +1055,7 @@ void GERBER_PLOTTER::FlashPadCircle( const wxPoint& pos, int diametre, EDA_DRAW_ void GERBER_PLOTTER::FlashPadOval( const wxPoint& pos, const wxSize& aSize, double orient, - EDA_DRAW_MODE_T trace_mode, void* aData ) + PLOT_MODE trace_mode, void* aData ) { wxASSERT( outputFile ); wxSize size( aSize ); @@ -1134,7 +1134,7 @@ void GERBER_PLOTTER::FlashPadOval( const wxPoint& pos, const wxSize& aSize, doub void GERBER_PLOTTER::FlashPadRect( const wxPoint& pos, const wxSize& aSize, - double orient, EDA_DRAW_MODE_T trace_mode, void* aData ) + double orient, PLOT_MODE trace_mode, void* aData ) { wxASSERT( outputFile ); @@ -1218,7 +1218,7 @@ void GERBER_PLOTTER::FlashPadRect( const wxPoint& pos, const wxSize& aSize, void GERBER_PLOTTER::FlashPadRoundRect( const wxPoint& aPadPos, const wxSize& aSize, int aCornerRadius, double aOrient, - EDA_DRAW_MODE_T aTraceMode, void* aData ) + PLOT_MODE aTraceMode, void* aData ) { GBR_METADATA* gbr_metadata = static_cast( aData ); @@ -1426,7 +1426,7 @@ void GERBER_PLOTTER::plotRoundRectAsRegion( const wxPoint& aRectCenter, const wx void GERBER_PLOTTER::FlashPadCustom( const wxPoint& aPadPos, const wxSize& aSize, SHAPE_POLY_SET* aPolygons, - EDA_DRAW_MODE_T aTraceMode, void* aData ) + PLOT_MODE aTraceMode, void* aData ) { // A Pad custom is plotted as polygon (a region in Gerber language). @@ -1468,7 +1468,7 @@ void GERBER_PLOTTER::FlashPadCustom( const wxPoint& aPadPos, const wxSize& aSize void GERBER_PLOTTER::FlashPadChamferRoundRect( const wxPoint& aShapePos, const wxSize& aPadSize, int aCornerRadius, double aChamferRatio, int aChamferPositions, - double aPadOrient, EDA_DRAW_MODE_T aPlotMode, void* aData ) + double aPadOrient, PLOT_MODE aPlotMode, void* aData ) { GBR_METADATA gbr_metadata; @@ -1590,7 +1590,7 @@ void GERBER_PLOTTER::FlashPadChamferRoundRect( const wxPoint& aShapePos, const w void GERBER_PLOTTER::FlashPadTrapez( const wxPoint& aPadPos, const wxPoint* aCorners, - double aPadOrient, EDA_DRAW_MODE_T aTrace_Mode, void* aData ) + double aPadOrient, PLOT_MODE aTrace_Mode, void* aData ) { // polygon corners list @@ -1643,7 +1643,7 @@ void GERBER_PLOTTER::FlashPadTrapez( const wxPoint& aPadPos, const wxPoint* aCo void GERBER_PLOTTER::FlashRegularPolygon( const wxPoint& aShapePos, int aDiameter, int aCornerCount, - double aOrient, EDA_DRAW_MODE_T aTraceMode, + double aOrient, PLOT_MODE aTraceMode, void* aData ) { GBR_METADATA* gbr_metadata = static_cast( aData ); diff --git a/common/plotters/HPGL_plotter.cpp b/common/plotters/HPGL_plotter.cpp index 2d98ad7e79..90dae28e59 100644 --- a/common/plotters/HPGL_plotter.cpp +++ b/common/plotters/HPGL_plotter.cpp @@ -442,7 +442,7 @@ void HPGL_PLOTTER::SetDash( PLOT_DASH_TYPE dashed ) void HPGL_PLOTTER::ThickSegment( const wxPoint& start, const wxPoint& end, - int width, EDA_DRAW_MODE_T tracemode, void* aData ) + int width, PLOT_MODE tracemode, void* aData ) { wxASSERT( outputFile ); wxPoint center; @@ -505,7 +505,7 @@ void HPGL_PLOTTER::Arc( const wxPoint& centre, double StAngle, double EndAngle, /* Plot oval pad. */ void HPGL_PLOTTER::FlashPadOval( const wxPoint& pos, const wxSize& aSize, double orient, - EDA_DRAW_MODE_T trace_mode, void* aData ) + PLOT_MODE trace_mode, void* aData ) { wxASSERT( outputFile ); int deltaxy, cx, cy; @@ -543,7 +543,7 @@ void HPGL_PLOTTER::FlashPadOval( const wxPoint& pos, const wxSize& aSize, double /* Plot round pad or via. */ void HPGL_PLOTTER::FlashPadCircle( const wxPoint& pos, int diametre, - EDA_DRAW_MODE_T trace_mode, void* aData ) + PLOT_MODE trace_mode, void* aData ) { wxASSERT( outputFile ); DPOINT pos_dev = userToDeviceCoordinates( pos ); @@ -583,7 +583,7 @@ void HPGL_PLOTTER::FlashPadCircle( const wxPoint& pos, int diametre, void HPGL_PLOTTER::FlashPadRect( const wxPoint& pos, const wxSize& padsize, - double orient, EDA_DRAW_MODE_T trace_mode, void* aData ) + double orient, PLOT_MODE trace_mode, void* aData ) { // Build rect polygon: std::vector corners; @@ -621,7 +621,7 @@ void HPGL_PLOTTER::FlashPadRect( const wxPoint& pos, const wxSize& padsize, void HPGL_PLOTTER::FlashPadRoundRect( const wxPoint& aPadPos, const wxSize& aSize, int aCornerRadius, double aOrient, - EDA_DRAW_MODE_T aTraceMode, void* aData ) + PLOT_MODE aTraceMode, void* aData ) { SHAPE_POLY_SET outline; @@ -659,7 +659,7 @@ void HPGL_PLOTTER::FlashPadRoundRect( const wxPoint& aPadPos, const wxSize& aSiz void HPGL_PLOTTER::FlashPadCustom( const wxPoint& aPadPos, const wxSize& aSize, SHAPE_POLY_SET* aPolygons, - EDA_DRAW_MODE_T aTraceMode, void* aData ) + PLOT_MODE aTraceMode, void* aData ) { std::vector< wxPoint > cornerList; @@ -682,7 +682,7 @@ void HPGL_PLOTTER::FlashPadCustom( const wxPoint& aPadPos, const wxSize& aSize, void HPGL_PLOTTER::FlashPadTrapez( const wxPoint& aPadPos, const wxPoint* aCorners, - double aPadOrient, EDA_DRAW_MODE_T aTraceMode, void* aData ) + double aPadOrient, PLOT_MODE aTraceMode, void* aData ) { std::vector< wxPoint > cornerList; cornerList.reserve( 5 ); @@ -704,7 +704,7 @@ void HPGL_PLOTTER::FlashPadTrapez( const wxPoint& aPadPos, const wxPoint* aCorne void HPGL_PLOTTER::FlashRegularPolygon( const wxPoint& aShapePos, int aRadius, int aCornerCount, - double aOrient, EDA_DRAW_MODE_T aTraceMode, void* aData ) + double aOrient, PLOT_MODE aTraceMode, void* aData ) { // Do nothing wxASSERT( 0 ); diff --git a/common/plotters/PS_plotter.cpp b/common/plotters/PS_plotter.cpp index be2266afd8..473a27a28f 100644 --- a/common/plotters/PS_plotter.cpp +++ b/common/plotters/PS_plotter.cpp @@ -88,7 +88,7 @@ void PSLIKE_PLOTTER::SetColor( COLOR4D color ) void PSLIKE_PLOTTER::FlashPadOval( const wxPoint& aPadPos, const wxSize& aSize, - double aPadOrient, EDA_DRAW_MODE_T aTraceMode, void* aData ) + double aPadOrient, PLOT_MODE aTraceMode, void* aData ) { wxASSERT( outputFile ); int x0, y0, x1, y1, delta; @@ -118,7 +118,7 @@ void PSLIKE_PLOTTER::FlashPadOval( const wxPoint& aPadPos, const wxSize& aSize, void PSLIKE_PLOTTER::FlashPadCircle( const wxPoint& aPadPos, int aDiameter, - EDA_DRAW_MODE_T aTraceMode, void* aData ) + PLOT_MODE aTraceMode, void* aData ) { if( aTraceMode == FILLED ) Circle( aPadPos, aDiameter, FILL_TYPE::FILLED_SHAPE, 0 ); @@ -139,7 +139,7 @@ void PSLIKE_PLOTTER::FlashPadCircle( const wxPoint& aPadPos, int aDiameter, void PSLIKE_PLOTTER::FlashPadRect( const wxPoint& aPadPos, const wxSize& aSize, - double aPadOrient, EDA_DRAW_MODE_T aTraceMode, void* aData ) + double aPadOrient, PLOT_MODE aTraceMode, void* aData ) { static std::vector< wxPoint > cornerList; wxSize size( aSize ); @@ -189,7 +189,7 @@ void PSLIKE_PLOTTER::FlashPadRect( const wxPoint& aPadPos, const wxSize& aSize, void PSLIKE_PLOTTER::FlashPadRoundRect( const wxPoint& aPadPos, const wxSize& aSize, int aCornerRadius, double aOrient, - EDA_DRAW_MODE_T aTraceMode, void* aData ) + PLOT_MODE aTraceMode, void* aData ) { wxSize size( aSize ); @@ -225,7 +225,7 @@ void PSLIKE_PLOTTER::FlashPadRoundRect( const wxPoint& aPadPos, const wxSize& aS void PSLIKE_PLOTTER::FlashPadCustom( const wxPoint& aPadPos, const wxSize& aSize, SHAPE_POLY_SET* aPolygons, - EDA_DRAW_MODE_T aTraceMode, void* aData ) + PLOT_MODE aTraceMode, void* aData ) { wxSize size( aSize ); @@ -258,7 +258,7 @@ void PSLIKE_PLOTTER::FlashPadCustom( const wxPoint& aPadPos, const wxSize& aSize } void PSLIKE_PLOTTER::FlashPadTrapez( const wxPoint& aPadPos, const wxPoint *aCorners, - double aPadOrient, EDA_DRAW_MODE_T aTraceMode, void* aData ) + double aPadOrient, PLOT_MODE aTraceMode, void* aData ) { static std::vector< wxPoint > cornerList; cornerList.clear(); @@ -305,7 +305,7 @@ void PSLIKE_PLOTTER::FlashPadTrapez( const wxPoint& aPadPos, const wxPoint *aCor void PSLIKE_PLOTTER::FlashRegularPolygon( const wxPoint& aShapePos, int aRadius, int aCornerCount, - double aOrient, EDA_DRAW_MODE_T aTraceMode, void* aData ) + double aOrient, PLOT_MODE aTraceMode, void* aData ) { // Do nothing wxASSERT( 0 ); diff --git a/common/plotters/plotter.cpp b/common/plotters/plotter.cpp index a8558e59c6..1c8b98b93e 100644 --- a/common/plotters/plotter.cpp +++ b/common/plotters/plotter.cpp @@ -435,7 +435,7 @@ void PLOTTER::Marker( const wxPoint& position, int diametre, unsigned aShapeId ) void PLOTTER::segmentAsOval( const wxPoint& start, const wxPoint& end, int width, - EDA_DRAW_MODE_T tracemode ) + PLOT_MODE tracemode ) { wxPoint center( (start.x + end.x) / 2, (start.y + end.y) / 2 ); wxSize size( end.x - start.x, end.y - start.y ); @@ -504,7 +504,7 @@ void PLOTTER::sketchOval( const wxPoint& pos, const wxSize& aSize, double orient void PLOTTER::ThickSegment( const wxPoint& start, const wxPoint& end, int width, - EDA_DRAW_MODE_T tracemode, void* aData ) + PLOT_MODE tracemode, void* aData ) { if( tracemode == FILLED ) { @@ -528,7 +528,7 @@ void PLOTTER::ThickSegment( const wxPoint& start, const wxPoint& end, int width, void PLOTTER::ThickArc( const wxPoint& centre, double StAngle, double EndAngle, - int radius, int width, EDA_DRAW_MODE_T tracemode, void* aData ) + int radius, int width, PLOT_MODE tracemode, void* aData ) { if( tracemode == FILLED ) Arc( centre, StAngle, EndAngle, radius, FILL_TYPE::NO_FILL, width ); @@ -544,7 +544,7 @@ void PLOTTER::ThickArc( const wxPoint& centre, double StAngle, double EndAngle, void PLOTTER::ThickRect( const wxPoint& p1, const wxPoint& p2, int width, - EDA_DRAW_MODE_T tracemode, void* aData ) + PLOT_MODE tracemode, void* aData ) { if( tracemode == FILLED ) Rect( p1, p2, FILL_TYPE::NO_FILL, width ); @@ -566,7 +566,7 @@ void PLOTTER::ThickRect( const wxPoint& p1, const wxPoint& p2, int width, void PLOTTER::ThickCircle( const wxPoint& pos, int diametre, int width, - EDA_DRAW_MODE_T tracemode, void* aData ) + PLOT_MODE tracemode, void* aData ) { if( tracemode == FILLED ) Circle( pos, diametre, FILL_TYPE::NO_FILL, width ); @@ -580,7 +580,7 @@ void PLOTTER::ThickCircle( const wxPoint& pos, int diametre, int width, void PLOTTER::FilledCircle( const wxPoint& pos, int diametre, - EDA_DRAW_MODE_T tracemode, void* aData ) + PLOT_MODE tracemode, void* aData ) { if( tracemode == FILLED ) Circle( pos, diametre, FILL_TYPE::FILLED_SHAPE, 0 ); diff --git a/common/plotters/plotter_dxf.h b/common/plotters/plotter_dxf.h index ab5ca3ac01..0f45029405 100644 --- a/common/plotters/plotter_dxf.h +++ b/common/plotters/plotter_dxf.h @@ -83,27 +83,27 @@ public: virtual void PlotPoly( const std::vector< wxPoint >& aCornerList, FILL_TYPE aFill, int aWidth = USE_DEFAULT_LINE_WIDTH, void * aData = NULL ) override; virtual void ThickSegment( const wxPoint& start, const wxPoint& end, int width, - EDA_DRAW_MODE_T tracemode, void* aData ) override; + PLOT_MODE tracemode, void* aData ) override; virtual void Arc( const wxPoint& centre, double StAngle, double EndAngle, int rayon, FILL_TYPE fill, int width = USE_DEFAULT_LINE_WIDTH ) override; virtual void PenTo( const wxPoint& pos, char plume ) override; virtual void FlashPadCircle( const wxPoint& pos, int diametre, - EDA_DRAW_MODE_T trace_mode, void* aData ) override; + PLOT_MODE trace_mode, void* aData ) override; virtual void FlashPadOval( const wxPoint& pos, const wxSize& size, double orient, - EDA_DRAW_MODE_T trace_mode, void* aData ) override; + PLOT_MODE trace_mode, void* aData ) override; virtual void FlashPadRect( const wxPoint& pos, const wxSize& size, - double orient, EDA_DRAW_MODE_T trace_mode, void* aData ) override; + double orient, PLOT_MODE trace_mode, void* aData ) override; virtual void FlashPadRoundRect( const wxPoint& aPadPos, const wxSize& aSize, int aCornerRadius, double aOrient, - EDA_DRAW_MODE_T aTraceMode, void* aData ) override; + PLOT_MODE aTraceMode, void* aData ) override; virtual void FlashPadCustom( const wxPoint& aPadPos, const wxSize& aSize, SHAPE_POLY_SET* aPolygons, - EDA_DRAW_MODE_T aTraceMode, void* aData ) override; + PLOT_MODE aTraceMode, void* aData ) override; virtual void FlashPadTrapez( const wxPoint& aPadPos, const wxPoint *aCorners, - double aPadOrient, EDA_DRAW_MODE_T aTraceMode, void* aData ) override; + double aPadOrient, PLOT_MODE aTraceMode, void* aData ) override; virtual void FlashRegularPolygon( const wxPoint& aShapePos, int aDiameter, int aCornerCount, - double aOrient, EDA_DRAW_MODE_T aTraceMode, void* aData ) override; + double aOrient, PLOT_MODE aTraceMode, void* aData ) override; virtual void Text( const wxPoint& aPos, const COLOR4D aColor, diff --git a/common/plotters/plotter_gerber.h b/common/plotters/plotter_gerber.h index 9585925c86..c2a560f7be 100644 --- a/common/plotters/plotter_gerber.h +++ b/common/plotters/plotter_gerber.h @@ -78,16 +78,16 @@ public: // These functions plot an item and manage X2 gerber attributes virtual void ThickSegment( const wxPoint& start, const wxPoint& end, int width, - EDA_DRAW_MODE_T tracemode, void* aData ) override; + PLOT_MODE tracemode, void* aData ) override; virtual void ThickArc( const wxPoint& centre, double StAngle, double EndAngle, - int rayon, int width, EDA_DRAW_MODE_T tracemode, void* aData ) override; + int rayon, int width, PLOT_MODE tracemode, void* aData ) override; virtual void ThickRect( const wxPoint& p1, const wxPoint& p2, int width, - EDA_DRAW_MODE_T tracemode, void* aData ) override; + PLOT_MODE tracemode, void* aData ) override; virtual void ThickCircle( const wxPoint& pos, int diametre, int width, - EDA_DRAW_MODE_T tracemode, void* aData ) override; + PLOT_MODE tracemode, void* aData ) override; virtual void FilledCircle( const wxPoint& pos, int diametre, - EDA_DRAW_MODE_T tracemode, void* aData ) override; + PLOT_MODE tracemode, void* aData ) override; /** * Gerber polygon: they can (and *should*) be filled with the @@ -116,20 +116,20 @@ public: * Filled circular flashes are stored as apertures */ virtual void FlashPadCircle( const wxPoint& pos, int diametre, - EDA_DRAW_MODE_T trace_mode, void* aData ) override; + PLOT_MODE trace_mode, void* aData ) override; /** * Filled oval flashes are handled as aperture in the 90 degree positions only */ virtual void FlashPadOval( const wxPoint& pos, const wxSize& size, double orient, - EDA_DRAW_MODE_T trace_mode, void* aData ) override; + PLOT_MODE trace_mode, void* aData ) override; /** * Filled rect flashes are handled as aperture in the 0 90 180 or 270 degree orientation only * and as polygon for other orientations * TODO: always use flashed shapes (aperture macros) */ virtual void FlashPadRect( const wxPoint& pos, const wxSize& size, - double orient, EDA_DRAW_MODE_T trace_mode, void* aData ) override; + double orient, PLOT_MODE trace_mode, void* aData ) override; /** * Roundrect pad at the moment are not handled as aperture, since @@ -138,20 +138,20 @@ public: */ virtual void FlashPadRoundRect( const wxPoint& aPadPos, const wxSize& aSize, int aCornerRadius, double aOrient, - EDA_DRAW_MODE_T aTraceMode, void* aData ) override; + PLOT_MODE aTraceMode, void* aData ) override; virtual void FlashPadCustom( const wxPoint& aPadPos, const wxSize& aSize, SHAPE_POLY_SET* aPolygons, - EDA_DRAW_MODE_T aTraceMode, void* aData ) override; + PLOT_MODE aTraceMode, void* aData ) override; /** * Trapezoidal pad at the moment are *never* handled as aperture, since * they require aperture macros * TODO: always use flashed shapes (aperture macros) */ virtual void FlashPadTrapez( const wxPoint& aPadPos, const wxPoint *aCorners, - double aPadOrient, EDA_DRAW_MODE_T aTraceMode, void* aData ) override; + double aPadOrient, PLOT_MODE aTraceMode, void* aData ) override; virtual void FlashRegularPolygon( const wxPoint& aShapePos, int aDiameter, int aCornerCount, - double aOrient, EDA_DRAW_MODE_T aTraceMode, void* aData ) override; + double aOrient, PLOT_MODE aTraceMode, void* aData ) override; /** * flash a chamfered round rect pad. @@ -172,7 +172,7 @@ public: void FlashPadChamferRoundRect( const wxPoint& aShapePos, const wxSize& aPadSize, int aCornerRadius, double aChamferRatio, int aChamferPositions, - double aPadOrient, EDA_DRAW_MODE_T aPlotMode, void* aData ); + double aPadOrient, PLOT_MODE aPlotMode, void* aData ); /** * Plot a Gerber region: similar to PlotPoly but plot only filled polygon, diff --git a/common/plotters/plotter_hpgl.h b/common/plotters/plotter_hpgl.h index cd178614c8..38f918606f 100644 --- a/common/plotters/plotter_hpgl.h +++ b/common/plotters/plotter_hpgl.h @@ -83,27 +83,27 @@ public: void * aData = NULL) override; virtual void ThickSegment( const wxPoint& start, const wxPoint& end, int width, - EDA_DRAW_MODE_T tracemode, void* aData ) override; + PLOT_MODE tracemode, void* aData ) override; virtual void Arc( const wxPoint& centre, double StAngle, double EndAngle, int rayon, FILL_TYPE fill, int width = USE_DEFAULT_LINE_WIDTH ) override; virtual void PenTo( const wxPoint& pos, char plume ) override; virtual void FlashPadCircle( const wxPoint& aPadPos, int aDiameter, - EDA_DRAW_MODE_T aTraceMode, void* aData ) override; + PLOT_MODE aTraceMode, void* aData ) override; virtual void FlashPadOval( const wxPoint& aPadPos, const wxSize& aSize, double aPadOrient, - EDA_DRAW_MODE_T aTraceMode, void* aData ) override; + PLOT_MODE aTraceMode, void* aData ) override; virtual void FlashPadRect( const wxPoint& aPadPos, const wxSize& aSize, - double aOrient, EDA_DRAW_MODE_T aTraceMode, void* aData ) override; + double aOrient, PLOT_MODE aTraceMode, void* aData ) override; virtual void FlashPadRoundRect( const wxPoint& aPadPos, const wxSize& aSize, int aCornerRadius, double aOrient, - EDA_DRAW_MODE_T aTraceMode, void* aData ) override; + PLOT_MODE aTraceMode, void* aData ) override; virtual void FlashPadCustom( const wxPoint& aPadPos, const wxSize& aSize, SHAPE_POLY_SET* aPolygons, - EDA_DRAW_MODE_T aTraceMode, void* aData ) override; + PLOT_MODE aTraceMode, void* aData ) override; virtual void FlashPadTrapez( const wxPoint& aPadPos, const wxPoint *aCorners, - double aPadOrient, EDA_DRAW_MODE_T aTraceMode, + double aPadOrient, PLOT_MODE aTraceMode, void* aData ) override; virtual void FlashRegularPolygon( const wxPoint& aShapePos, int aDiameter, int aCornerCount, - double aOrient, EDA_DRAW_MODE_T aTraceMode, void* aData ) override; + double aOrient, PLOT_MODE aTraceMode, void* aData ) override; protected: void penControl( char plume ); diff --git a/common/plotters/plotters_pslike.h b/common/plotters/plotters_pslike.h index 9b0c91a60d..9b1a672ace 100644 --- a/common/plotters/plotters_pslike.h +++ b/common/plotters/plotters_pslike.h @@ -66,22 +66,22 @@ public: // Pad routines are handled with lower level primitives virtual void FlashPadCircle( const wxPoint& aPadPos, int aDiameter, - EDA_DRAW_MODE_T aTraceMode, void* aData ) override; + PLOT_MODE aTraceMode, void* aData ) override; virtual void FlashPadOval( const wxPoint& aPadPos, const wxSize& aSize, double aPadOrient, - EDA_DRAW_MODE_T aTraceMode, void* aData ) override; + PLOT_MODE aTraceMode, void* aData ) override; virtual void FlashPadRect( const wxPoint& aPadPos, const wxSize& aSize, - double aPadOrient, EDA_DRAW_MODE_T aTraceMode, + double aPadOrient, PLOT_MODE aTraceMode, void* aData ) override; virtual void FlashPadRoundRect( const wxPoint& aPadPos, const wxSize& aSize, int aCornerRadius, double aOrient, - EDA_DRAW_MODE_T aTraceMode, void* aData ) override; + PLOT_MODE aTraceMode, void* aData ) override; virtual void FlashPadCustom( const wxPoint& aPadPos, const wxSize& aSize, SHAPE_POLY_SET* aPolygons, - EDA_DRAW_MODE_T aTraceMode, void* aData ) override; + PLOT_MODE aTraceMode, void* aData ) override; virtual void FlashPadTrapez( const wxPoint& aPadPos, const wxPoint *aCorners, - double aPadOrient, EDA_DRAW_MODE_T aTraceMode, void* aData ) override; + double aPadOrient, PLOT_MODE aTraceMode, void* aData ) override; virtual void FlashRegularPolygon( const wxPoint& aShapePos, int aDiameter, int aCornerCount, - double aOrient, EDA_DRAW_MODE_T aTraceMode, void* aData ) override; + double aOrient, PLOT_MODE aTraceMode, void* aData ) override; /** The SetColor implementation is split with the subclasses: * The PSLIKE computes the rgb values, the subclass emits the diff --git a/include/eda_text.h b/include/eda_text.h index cfa21a3acd..ca327a0edb 100644 --- a/include/eda_text.h +++ b/include/eda_text.h @@ -268,7 +268,7 @@ public: * @param aDisplay_mode = FILLED or SKETCH */ void Print( RENDER_SETTINGS* aSettings, const wxPoint& aOffset, COLOR4D aColor, - EDA_DRAW_MODE_T aDisplay_mode = FILLED ); + PLOT_MODE aDisplay_mode = FILLED ); /** * Convert the text shape to a list of segment. @@ -396,7 +396,7 @@ private: * @param aPos = the position of this line ). */ void printOneLineOfText( RENDER_SETTINGS* aSettings, const wxPoint& aOffset, COLOR4D aColor, - EDA_DRAW_MODE_T aFillMode, const wxString& aText, + PLOT_MODE aFillMode, const wxString& aText, const wxPoint& aPos ); }; diff --git a/include/plot_mode.h b/include/plot_mode.h index 6fb08e6da3..9544e87c9f 100644 --- a/include/plot_mode.h +++ b/include/plot_mode.h @@ -21,7 +21,7 @@ #define PLOT_MODE_H /* Options to draw items with thickness ( segments, arcs, circles, texts...) */ -enum EDA_DRAW_MODE_T +enum PLOT_MODE { SKETCH = 0, // sketch mode: draw segments outlines only FILLED = 1 // normal mode: solid segments diff --git a/include/plotter.h b/include/plotter.h index 85eeb18385..0e5cd2d6f1 100644 --- a/include/plotter.h +++ b/include/plotter.h @@ -320,15 +320,15 @@ public: // Higher level primitives -- can be drawn as line, sketch or 'filled' virtual void ThickSegment( const wxPoint& start, const wxPoint& end, int width, - EDA_DRAW_MODE_T tracemode, void* aData ); + PLOT_MODE tracemode, void* aData ); virtual void ThickArc( const wxPoint& centre, double StAngle, double EndAngle, - int rayon, int width, EDA_DRAW_MODE_T tracemode, void* aData ); + int rayon, int width, PLOT_MODE tracemode, void* aData ); virtual void ThickRect( const wxPoint& p1, const wxPoint& p2, int width, - EDA_DRAW_MODE_T tracemode, void* aData ); + PLOT_MODE tracemode, void* aData ); virtual void ThickCircle( const wxPoint& pos, int diametre, int width, - EDA_DRAW_MODE_T tracemode, void* aData ); + PLOT_MODE tracemode, void* aData ); virtual void FilledCircle( const wxPoint& pos, int diametre, - EDA_DRAW_MODE_T tracemode, void* aData ); + PLOT_MODE tracemode, void* aData ); // Flash primitives @@ -341,7 +341,7 @@ public: * @param aData an auxiliary info (mainly for gerber format attributes) */ virtual void FlashPadCircle( const wxPoint& aPadPos, int aDiameter, - EDA_DRAW_MODE_T aTraceMode, void* aData ) = 0; + PLOT_MODE aTraceMode, void* aData ) = 0; /** * virtual function FlashPadOval @@ -352,7 +352,7 @@ public: * @param aData an auxiliary info (mainly for gerber format attributes) */ virtual void FlashPadOval( const wxPoint& aPadPos, const wxSize& aSize, double aPadOrient, - EDA_DRAW_MODE_T aTraceMode, void* aData ) = 0; + PLOT_MODE aTraceMode, void* aData ) = 0; /** * virtual function FlashPadRect @@ -363,7 +363,7 @@ public: * @param aData an auxuliary info (mainly for gerber format attributes) */ virtual void FlashPadRect( const wxPoint& aPadPos, const wxSize& aSize, - double aPadOrient, EDA_DRAW_MODE_T aTraceMode, void* aData ) = 0; + double aPadOrient, PLOT_MODE aTraceMode, void* aData ) = 0; /** * virtual function FlashPadRoundRect @@ -376,7 +376,7 @@ public: */ virtual void FlashPadRoundRect( const wxPoint& aPadPos, const wxSize& aSize, int aCornerRadius, double aOrient, - EDA_DRAW_MODE_T aTraceMode, void* aData ) = 0; + PLOT_MODE aTraceMode, void* aData ) = 0; /** * virtual function FlashPadCustom @@ -388,7 +388,7 @@ public: */ virtual void FlashPadCustom( const wxPoint& aPadPos, const wxSize& aSize, SHAPE_POLY_SET* aPolygons, - EDA_DRAW_MODE_T aTraceMode, void* aData ) = 0; + PLOT_MODE aTraceMode, void* aData ) = 0; /** virtual function FlashPadTrapez * flash a trapezoidal pad @@ -400,7 +400,7 @@ public: * @param aData an auxiliary info (mainly for gerber format attributes) */ virtual void FlashPadTrapez( const wxPoint& aPadPos, const wxPoint *aCorners, - double aPadOrient, EDA_DRAW_MODE_T aTraceMode, + double aPadOrient, PLOT_MODE aTraceMode, void* aData ) = 0; /** Flash a regular polygon. Usefull only in Gerber files to flash a regular polygon @@ -412,7 +412,7 @@ public: * specific to the plotter */ virtual void FlashRegularPolygon( const wxPoint& aShapePos, int aDiameter, int aCornerCount, - double aOrient, EDA_DRAW_MODE_T aTraceMode, void* aData ) = 0 ; + double aOrient, PLOT_MODE aTraceMode, void* aData ) = 0 ; /** * Draws text with the plotter. For convenience it accept the color to use @@ -538,7 +538,7 @@ protected: * Cdonvert a thick segment and plot it as an oval */ void segmentAsOval( const wxPoint& start, const wxPoint& end, int width, - EDA_DRAW_MODE_T tracemode ); + PLOT_MODE tracemode ); void sketchOval( const wxPoint& pos, const wxSize& size, double orient, int width ); diff --git a/pcbnew/dialogs/dialog_plot.h b/pcbnew/dialogs/dialog_plot.h index 2e6d478499..878dfe8e7f 100644 --- a/pcbnew/dialogs/dialog_plot.h +++ b/pcbnew/dialogs/dialog_plot.h @@ -82,7 +82,7 @@ private: void applyPlotSettings(); PLOT_FORMAT getPlotFormat(); - void setPlotModeChoiceSelection( EDA_DRAW_MODE_T aPlotMode ) + void setPlotModeChoiceSelection( PLOT_MODE aPlotMode ) { m_plotModeOpt->SetSelection( aPlotMode == SKETCH ? 1 : 0 ); } diff --git a/pcbnew/pcb_plot_params.h b/pcbnew/pcb_plot_params.h index f9d03f2fa6..dc1d1f58f0 100644 --- a/pcbnew/pcb_plot_params.h +++ b/pcbnew/pcb_plot_params.h @@ -24,7 +24,7 @@ */ #include -#include // EDA_DRAW_MODE_T +#include #include #include @@ -53,7 +53,7 @@ private: /** FILLED or SKETCH selects how to plot filled objects. * FILLED or SKETCH not available with all drivers: some have fixed mode */ - EDA_DRAW_MODE_T m_plotMode; + PLOT_MODE m_plotMode; /** DXF format: Plot items in outline (polygon) mode * In polygon mode, each item to plot is converted to a polygon, and all @@ -223,8 +223,8 @@ public: return m_textMode; } - void SetPlotMode( EDA_DRAW_MODE_T aPlotMode ) { m_plotMode = aPlotMode; } - EDA_DRAW_MODE_T GetPlotMode() const { return m_plotMode; } + void SetPlotMode( PLOT_MODE aPlotMode ) { m_plotMode = aPlotMode; } + PLOT_MODE GetPlotMode() const { return m_plotMode; } void SetDXFPlotPolygonMode( bool aFlag ) { m_DXFplotPolygonMode = aFlag; } bool GetDXFPlotPolygonMode() const { return m_DXFplotPolygonMode; } diff --git a/pcbnew/pcbplot.h b/pcbnew/pcbplot.h index bef1ba4dd3..fdc41f85c8 100644 --- a/pcbnew/pcbplot.h +++ b/pcbnew/pcbplot.h @@ -112,7 +112,7 @@ public: * and be drawn as a non filled item although the plot mode is filled * color and plot mode are needed by this function */ - void PlotPad( D_PAD* aPad, COLOR4D aColor, EDA_DRAW_MODE_T aPlotMode ); + void PlotPad( D_PAD* aPad, COLOR4D aColor, PLOT_MODE aPlotMode ); /** * plot items like text and graphics, diff --git a/pcbnew/plot_board_layers.cpp b/pcbnew/plot_board_layers.cpp index 1820e00232..59c90ebee4 100644 --- a/pcbnew/plot_board_layers.cpp +++ b/pcbnew/plot_board_layers.cpp @@ -207,7 +207,7 @@ void PlotStandardLayer( BOARD *aBoard, PLOTTER* aPlotter, LSET aLayerMask, itemplotter.SetLayerSet( aLayerMask ); - EDA_DRAW_MODE_T plotMode = aPlotOpt.GetPlotMode(); + PLOT_MODE plotMode = aPlotOpt.GetPlotMode(); bool onCopperLayer = ( LSET::AllCuMask() & aLayerMask ).any(); bool onSolderMaskLayer = ( LSET( 2, F_Mask, B_Mask ) & aLayerMask ).any(); bool onSolderPasteLayer = ( LSET( 2, F_Paste, B_Paste ) & aLayerMask ).any(); @@ -233,7 +233,7 @@ void PlotStandardLayer( BOARD *aBoard, PLOTTER* aPlotter, LSET aLayerMask, for( D_PAD* pad : module->Pads() ) { - EDA_DRAW_MODE_T padPlotMode = plotMode; + PLOT_MODE padPlotMode = plotMode; if( !( pad->GetLayerSet() & aLayerMask ).any() ) { diff --git a/pcbnew/plot_brditems_plotter.cpp b/pcbnew/plot_brditems_plotter.cpp index f04064137b..a9a140a014 100644 --- a/pcbnew/plot_brditems_plotter.cpp +++ b/pcbnew/plot_brditems_plotter.cpp @@ -42,7 +42,7 @@ #include // for BOARD_DESIGN_SETTINGS #include // for dyn_cast, PCB_DIMENSION_T -#include // for FILLED, EDA_DRAW_MODE_T +#include #include // for COLOR4D, operator!= #include #include // for GBR_NETLIST_METADATA @@ -85,7 +85,7 @@ COLOR4D BRDITEMS_PLOTTER::getColor( LAYER_NUM aLayer ) } -void BRDITEMS_PLOTTER::PlotPad( D_PAD* aPad, COLOR4D aColor, EDA_DRAW_MODE_T aPlotMode ) +void BRDITEMS_PLOTTER::PlotPad( D_PAD* aPad, COLOR4D aColor, PLOT_MODE aPlotMode ) { wxPoint shape_pos = aPad->ShapePos(); GBR_METADATA gbr_metadata;