diff --git a/common/base_struct.cpp b/common/base_struct.cpp index cf09a6d4c2..5d1655e39a 100644 --- a/common/base_struct.cpp +++ b/common/base_struct.cpp @@ -427,7 +427,7 @@ bool EDA_TEXT::TextHitTest( const EDA_RECT& aRect, bool aContains, int aAccuracy void EDA_TEXT::Draw( EDA_DRAW_PANEL* aPanel, wxDC* aDC, const wxPoint& aOffset, EDA_Colors aColor, int aDrawMode, - GRTraceMode aFillMode, EDA_Colors aAnchor_color ) + EDA_DRAW_MODE_T aFillMode, EDA_Colors aAnchor_color ) { if( m_MultilineAllowed ) { @@ -471,13 +471,13 @@ void EDA_TEXT::Draw( EDA_DRAW_PANEL* aPanel, wxDC* aDC, const wxPoint& aOffset, void EDA_TEXT::DrawOneLineOfText( EDA_DRAW_PANEL* aPanel, wxDC* aDC, const wxPoint& aOffset, EDA_Colors aColor, - int aDrawMode, GRTraceMode aFillMode, + int aDrawMode, EDA_DRAW_MODE_T aFillMode, EDA_Colors aAnchor_color, wxString& aText, wxPoint aPos ) { int width = m_Thickness; - if( aFillMode == FILAIRE ) + if( aFillMode == LINE ) width = 0; if( aDrawMode != -1 ) diff --git a/common/class_plotter.cpp b/common/class_plotter.cpp index e86267dc69..1908b9d64b 100644 --- a/common/class_plotter.cpp +++ b/common/class_plotter.cpp @@ -254,7 +254,7 @@ void PLOTTER::marker( const wxPoint& position, int diametre, int aShapeId ) /* Convert a thick segment and plot it as an oval */ void PLOTTER::segment_as_oval( wxPoint start, wxPoint end, int width, - GRTraceMode tracemode ) + EDA_DRAW_MODE_T tracemode ) { wxPoint center( (start.x + end.x) / 2, (start.y + end.y) / 2 ); wxSize size( end.x - start.x, end.y - start.y ); @@ -328,12 +328,12 @@ void PLOTTER::sketch_oval( wxPoint pos, wxSize size, int orient, /* Plot 1 segment like a track segment */ void PLOTTER::thick_segment( wxPoint start, wxPoint end, int width, - GRTraceMode tracemode ) + EDA_DRAW_MODE_T tracemode ) { switch( tracemode ) { case FILLED: - case FILAIRE: + case LINE: set_current_line_width( tracemode==FILLED ? width : -1 ); move_to( start ); finish_to( end ); @@ -348,11 +348,11 @@ void PLOTTER::thick_segment( wxPoint start, wxPoint end, int width, void PLOTTER::thick_arc( wxPoint centre, int StAngle, int EndAngle, int radius, - int width, GRTraceMode tracemode ) + int width, EDA_DRAW_MODE_T tracemode ) { switch( tracemode ) { - case FILAIRE: + case LINE: set_current_line_width( -1 ); arc( centre, StAngle, EndAngle, radius, NO_FILL, -1 ); break; @@ -373,11 +373,11 @@ void PLOTTER::thick_arc( wxPoint centre, int StAngle, int EndAngle, int radius, void PLOTTER::thick_rect( wxPoint p1, wxPoint p2, int width, - GRTraceMode tracemode ) + EDA_DRAW_MODE_T tracemode ) { switch( tracemode ) { - case FILAIRE: + case LINE: rect( p1, p2, NO_FILL, -1 ); break; @@ -403,11 +403,11 @@ void PLOTTER::thick_rect( wxPoint p1, wxPoint p2, int width, void PLOTTER::thick_circle( wxPoint pos, int diametre, int width, - GRTraceMode tracemode ) + EDA_DRAW_MODE_T tracemode ) { switch( tracemode ) { - case FILAIRE: + case LINE: circle( pos, diametre, NO_FILL, -1 ); break; diff --git a/common/common_plotDXF_functions.cpp b/common/common_plotDXF_functions.cpp index 85a50b6790..165da464f8 100644 --- a/common/common_plotDXF_functions.cpp +++ b/common/common_plotDXF_functions.cpp @@ -213,15 +213,17 @@ void DXF_PLOTTER::set_dash( bool dashed ) * @param aPlotMode = FILLED, SKETCH .. */ void DXF_PLOTTER::thick_segment( wxPoint aStart, wxPoint aEnd, int aWidth, - GRTraceMode aPlotMode ) + EDA_DRAW_MODE_T aPlotMode ) { - if( aPlotMode == FILAIRE ) /* just a line is Ok */ + if( aPlotMode == LINE ) /* just a line is Ok */ { move_to( aStart ); finish_to( aEnd ); } else + { segment_as_oval( aStart, aEnd, aWidth, aPlotMode ); + } } @@ -253,7 +255,7 @@ void DXF_PLOTTER::arc( wxPoint centre, int StAngle, int EndAngle, int radius, /* Plot oval pad at position. */ void DXF_PLOTTER::flash_pad_oval( wxPoint pos, wxSize size, int orient, - GRTraceMode trace_mode ) + EDA_DRAW_MODE_T trace_mode ) { wxASSERT( output_file ); @@ -272,7 +274,7 @@ void DXF_PLOTTER::flash_pad_oval( wxPoint pos, wxSize size, int orient, /* Plot round pad or via. */ void DXF_PLOTTER::flash_pad_circle( wxPoint pos, int diametre, - GRTraceMode trace_mode ) + EDA_DRAW_MODE_T trace_mode ) { wxASSERT( output_file ); circle( pos, diametre, NO_FILL ); @@ -283,7 +285,7 @@ void DXF_PLOTTER::flash_pad_circle( wxPoint pos, int diametre, * Plot rectangular pad vertical or horizontal (rectangular Pad) */ void DXF_PLOTTER::flash_pad_rect( wxPoint pos, wxSize padsize, - int orient, GRTraceMode trace_mode ) + int orient, EDA_DRAW_MODE_T trace_mode ) { wxASSERT( output_file ); wxSize size; @@ -353,7 +355,7 @@ void DXF_PLOTTER::flash_pad_rect( wxPoint pos, wxSize padsize, * Plot mode = FILLED, SKETCH (unused) */ void DXF_PLOTTER::flash_pad_trapez( wxPoint aPadPos, wxPoint aCorners[4], - int aPadOrient, GRTraceMode aTrace_Mode ) + int aPadOrient, EDA_DRAW_MODE_T aTrace_Mode ) { wxASSERT( output_file ); wxPoint coord[4]; /* coord actual corners of a trapezoidal trace */ diff --git a/common/common_plotGERBER_functions.cpp b/common/common_plotGERBER_functions.cpp index ee9506eee9..bced1d6f22 100644 --- a/common/common_plotGERBER_functions.cpp +++ b/common/common_plotGERBER_functions.cpp @@ -369,14 +369,14 @@ void GERBER_PLOTTER::PlotImage( wxImage & aImage, wxPoint aPos, double aScaleFac /* Function flash_pad_circle * Plot a circular pad or via at the user position pos */ -void GERBER_PLOTTER::flash_pad_circle( wxPoint pos, int diametre, GRTraceMode trace_mode ) +void GERBER_PLOTTER::flash_pad_circle( wxPoint pos, int diametre, EDA_DRAW_MODE_T trace_mode ) { wxASSERT( output_file ); wxSize size( diametre, diametre ); switch( trace_mode ) { - case FILAIRE: + case LINE: case SKETCH: set_current_line_width( -1 ); circle( pos, diametre - current_pen_width, NO_FILL ); @@ -398,7 +398,7 @@ void GERBER_PLOTTER::flash_pad_circle( wxPoint pos, int diametre, GRTraceMode tr * For any orientation the shape is drawn as a segment */ void GERBER_PLOTTER::flash_pad_oval( wxPoint pos, wxSize size, int orient, - GRTraceMode trace_mode ) + EDA_DRAW_MODE_T trace_mode ) { wxASSERT( output_file ); int x0, y0, x1, y1, delta; @@ -455,7 +455,7 @@ void GERBER_PLOTTER::flash_pad_oval( wxPoint pos, wxSize size, int orient, * For others shape the direction is plotted as a polygon. */ void GERBER_PLOTTER::flash_pad_rect( wxPoint pos, wxSize size, - int orient, GRTraceMode trace_mode ) + int orient, EDA_DRAW_MODE_T trace_mode ) { wxASSERT( output_file ); @@ -472,7 +472,7 @@ void GERBER_PLOTTER::flash_pad_rect( wxPoint pos, wxSize size, case 1800: switch( trace_mode ) { - case FILAIRE: + case LINE: case SKETCH: set_current_line_width( -1 ); rect( wxPoint( pos.x - (size.x - current_pen_width) / 2, @@ -522,7 +522,7 @@ void GERBER_PLOTTER::flash_pad_rect( wxPoint pos, wxSize size, * Plot mode = FILLED or SKETCH */ void GERBER_PLOTTER::flash_pad_trapez( wxPoint aPadPos, wxPoint aCorners[4], - int aPadOrient, GRTraceMode aTrace_Mode ) + int aPadOrient, EDA_DRAW_MODE_T aTrace_Mode ) { // polygon corners list diff --git a/common/common_plotHPGL_functions.cpp b/common/common_plotHPGL_functions.cpp index 0f85c9ecec..d19689266a 100644 --- a/common/common_plotHPGL_functions.cpp +++ b/common/common_plotHPGL_functions.cpp @@ -203,13 +203,13 @@ void HPGL_PLOTTER::set_dash( bool dashed ) * @param width = segment width (thickness) * @param tracemode = FILLED, SKETCH .. */ -void HPGL_PLOTTER::thick_segment( wxPoint start, wxPoint end, int width, GRTraceMode tracemode ) +void HPGL_PLOTTER::thick_segment( wxPoint start, wxPoint end, int width, EDA_DRAW_MODE_T tracemode ) { wxASSERT( output_file ); wxPoint center; wxSize size; - if( (pen_diameter >= width) || (tracemode == FILAIRE) ) /* just a line is + if( (pen_diameter >= width) || (tracemode == LINE) ) /* just a line is * Ok */ { move_to( start ); @@ -266,7 +266,7 @@ void HPGL_PLOTTER::arc( wxPoint centre, int StAngle, int EndAngle, int rayon, /* Plot oval pad. */ void HPGL_PLOTTER::flash_pad_oval( wxPoint pos, wxSize size, int orient, - GRTraceMode trace_mode ) + EDA_DRAW_MODE_T trace_mode ) { wxASSERT( output_file ); int deltaxy, cx, cy; @@ -305,7 +305,7 @@ void HPGL_PLOTTER::flash_pad_oval( wxPoint pos, wxSize size, int orient, /* Plot round pad or via. */ void HPGL_PLOTTER::flash_pad_circle( wxPoint pos, int diametre, - GRTraceMode trace_mode ) + EDA_DRAW_MODE_T trace_mode ) { wxASSERT( output_file ); int rayon, delta; @@ -314,7 +314,8 @@ void HPGL_PLOTTER::flash_pad_circle( wxPoint pos, int diametre, delta = wxRound( pen_diameter - pen_overlap ); rayon = diametre / 2; - if( trace_mode != FILAIRE ) + + if( trace_mode != LINE ) { rayon = ( diametre - wxRound( pen_diameter ) ) / 2; } @@ -356,7 +357,7 @@ void HPGL_PLOTTER::flash_pad_circle( wxPoint pos, int diametre, * Units are user units */ void HPGL_PLOTTER::flash_pad_rect( wxPoint pos, wxSize padsize, - int orient, GRTraceMode trace_mode ) + int orient, EDA_DRAW_MODE_T trace_mode ) { wxASSERT( output_file ); wxSize size; @@ -366,7 +367,7 @@ void HPGL_PLOTTER::flash_pad_rect( wxPoint pos, wxSize padsize, size.x = padsize.x / 2; size.y = padsize.y / 2; - if( trace_mode != FILAIRE ) + if( trace_mode != LINE ) { size.x = (padsize.x - (int) pen_diameter) / 2; size.y = (padsize.y - (int) pen_diameter) / 2; @@ -474,7 +475,7 @@ void HPGL_PLOTTER::flash_pad_rect( wxPoint pos, wxSize padsize, * Plot mode FILLED or SKETCH */ void HPGL_PLOTTER::flash_pad_trapez( wxPoint aPadPos, wxPoint aCorners[4], - int aPadOrient, GRTraceMode aTrace_Mode ) + int aPadOrient, EDA_DRAW_MODE_T aTrace_Mode ) { wxASSERT( output_file ); wxPoint polygone[4]; // coordinates of corners relatives to the pad diff --git a/common/common_plotPS_functions.cpp b/common/common_plotPS_functions.cpp index ca195ec38d..4eefbb4bfd 100644 --- a/common/common_plotPS_functions.cpp +++ b/common/common_plotPS_functions.cpp @@ -454,7 +454,7 @@ bool PS_PLOTTER::end_plot() * The shape is drawn as a segment */ void PS_PLOTTER::flash_pad_oval( wxPoint pos, wxSize size, int orient, - GRTraceMode modetrace ) + EDA_DRAW_MODE_T modetrace ) { wxASSERT( output_file ); int x0, y0, x1, y1, delta; @@ -487,7 +487,7 @@ void PS_PLOTTER::flash_pad_oval( wxPoint pos, wxSize size, int orient, /* Plot round pad or via. */ void PS_PLOTTER::flash_pad_circle( wxPoint pos, int diametre, - GRTraceMode modetrace ) + EDA_DRAW_MODE_T modetrace ) { wxASSERT( output_file ); @@ -507,7 +507,7 @@ void PS_PLOTTER::flash_pad_circle( wxPoint pos, int diametre, /* Plot rectangular pad in any orientation. */ void PS_PLOTTER::flash_pad_rect( wxPoint pos, wxSize size, - int orient, GRTraceMode trace_mode ) + int orient, EDA_DRAW_MODE_T trace_mode ) { static std::vector< wxPoint > cornerList; cornerList.clear(); @@ -555,7 +555,7 @@ void PS_PLOTTER::flash_pad_rect( wxPoint pos, wxSize size, * Plot mode FILLED or SKETCH */ void PS_PLOTTER::flash_pad_trapez( wxPoint aPadPos, wxPoint aCorners[4], - int aPadOrient, GRTraceMode aTrace_Mode ) + int aPadOrient, EDA_DRAW_MODE_T aTrace_Mode ) { static std::vector< wxPoint > cornerList; cornerList.clear(); diff --git a/common/drawtxt.cpp b/common/drawtxt.cpp index 90991306b9..e2913226cf 100644 --- a/common/drawtxt.cpp +++ b/common/drawtxt.cpp @@ -230,8 +230,8 @@ void DrawGraphicText( EDA_DRAW_PANEL* aPanel, const wxString& aText, int aOrient, const wxSize& aSize, - enum GRTextHorizJustifyType aH_justify, - enum GRTextVertJustifyType aV_justify, + enum EDA_TEXT_HJUSTIFY_T aH_justify, + enum EDA_TEXT_VJUSTIFY_T aV_justify, int aWidth, bool aItalic, bool aBold, @@ -521,8 +521,8 @@ void PLOTTER::text( const wxPoint& aPos, const wxString& aText, int aOrient, const wxSize& aSize, - enum GRTextHorizJustifyType aH_justify, - enum GRTextVertJustifyType aV_justify, + enum EDA_TEXT_HJUSTIFY_T aH_justify, + enum EDA_TEXT_VJUSTIFY_T aV_justify, int aWidth, bool aItalic, bool aBold ) diff --git a/eeschema/dialogs/dialog_edit_component_in_schematic.cpp b/eeschema/dialogs/dialog_edit_component_in_schematic.cpp index ba310c121d..94fe42f810 100644 --- a/eeschema/dialogs/dialog_edit_component_in_schematic.cpp +++ b/eeschema/dialogs/dialog_edit_component_in_schematic.cpp @@ -685,12 +685,12 @@ bool DIALOG_EDIT_COMPONENT_IN_SCHEMATIC::copyPanelToSelectedField() rotateCheckBox->SetValue( field.m_Orient == TEXT_ORIENT_VERT ); // Copy the text justification - GRTextHorizJustifyType hjustify[3] = { + EDA_TEXT_HJUSTIFY_T hjustify[3] = { GR_TEXT_HJUSTIFY_LEFT, GR_TEXT_HJUSTIFY_CENTER, GR_TEXT_HJUSTIFY_RIGHT }; - GRTextVertJustifyType vjustify[3] = { + EDA_TEXT_VJUSTIFY_T vjustify[3] = { GR_TEXT_VJUSTIFY_BOTTOM, GR_TEXT_VJUSTIFY_CENTER, GR_TEXT_VJUSTIFY_TOP }; diff --git a/eeschema/dialogs/dialog_edit_libentry_fields_in_lib.cpp b/eeschema/dialogs/dialog_edit_libentry_fields_in_lib.cpp index 9f0e8018d6..1717826ad2 100644 --- a/eeschema/dialogs/dialog_edit_libentry_fields_in_lib.cpp +++ b/eeschema/dialogs/dialog_edit_libentry_fields_in_lib.cpp @@ -712,12 +712,12 @@ bool DIALOG_EDIT_LIBENTRY_FIELDS_IN_LIB::copyPanelToSelectedField() field.m_Orient = TEXT_ORIENT_HORIZ; // Copy the text justification - static const GRTextHorizJustifyType hjustify[3] = { + static const EDA_TEXT_HJUSTIFY_T hjustify[3] = { GR_TEXT_HJUSTIFY_LEFT, GR_TEXT_HJUSTIFY_CENTER, GR_TEXT_HJUSTIFY_RIGHT }; - static const GRTextVertJustifyType vjustify[3] = { + static const EDA_TEXT_VJUSTIFY_T vjustify[3] = { GR_TEXT_VJUSTIFY_BOTTOM, GR_TEXT_VJUSTIFY_CENTER, GR_TEXT_VJUSTIFY_TOP }; diff --git a/eeschema/sch_component.cpp b/eeschema/sch_component.cpp index d812bcec20..4bfd9547fa 100644 --- a/eeschema/sch_component.cpp +++ b/eeschema/sch_component.cpp @@ -1252,8 +1252,8 @@ bool SCH_COMPONENT::Load( LINE_READER& aLine, wxString& aErrorMsg ) int fieldNdx; wxString fieldText; - GRTextHorizJustifyType hjustify = GR_TEXT_HJUSTIFY_CENTER; - GRTextVertJustifyType vjustify = GR_TEXT_VJUSTIFY_CENTER; + EDA_TEXT_HJUSTIFY_T hjustify = GR_TEXT_HJUSTIFY_CENTER; + EDA_TEXT_VJUSTIFY_T vjustify = GR_TEXT_VJUSTIFY_CENTER; ptcar = (char*) aLine; diff --git a/eeschema/sch_field.cpp b/eeschema/sch_field.cpp index c4a8dd0671..3cf24b4c58 100644 --- a/eeschema/sch_field.cpp +++ b/eeschema/sch_field.cpp @@ -546,8 +546,8 @@ void SCH_FIELD::doPlot( PLOTTER* aPlotter ) * and use GetBoundaryBox to know the text coordinate considered as centered */ EDA_RECT BoundaryBox = GetBoundingBox(); - GRTextHorizJustifyType hjustify = GR_TEXT_HJUSTIFY_CENTER; - GRTextVertJustifyType vjustify = GR_TEXT_VJUSTIFY_CENTER; + EDA_TEXT_HJUSTIFY_T hjustify = GR_TEXT_HJUSTIFY_CENTER; + EDA_TEXT_VJUSTIFY_T vjustify = GR_TEXT_VJUSTIFY_CENTER; wxPoint textpos = BoundaryBox.Centre(); int thickness = GetPenSize(); diff --git a/gerbview/gerbview_frame.h b/gerbview/gerbview_frame.h index 0733388363..d2d14baefe 100644 --- a/gerbview/gerbview_frame.h +++ b/gerbview/gerbview_frame.h @@ -459,12 +459,12 @@ public: GERBVIEW_FRAME( wxWindow* father, const wxString& title, void Genere_GERBER( const wxString& FullFileName, int Layers ); void Genere_PS( const wxString& FullFileName, int Layers ); void Plot_Layer_HPGL( FILE* File, int masque_layer,int garde, bool trace_via, - GRTraceMode trace_mode ); + EDA_DRAW_MODE_T trace_mode ); void Plot_Layer_GERBER( FILE* File, int masque_layer, int garde, bool trace_via, - GRTraceMode trace_mode ); + EDA_DRAW_MODE_T trace_mode ); int Gen_D_CODE_File( const wxString& Name_File ); void Plot_Layer_PS( FILE* File, int masque_layer, int garde, bool trace_via, - GRTraceMode trace_mode ); + EDA_DRAW_MODE_T trace_mode ); void Files_io( wxCommandEvent& event ); diff --git a/include/base_struct.h b/include/base_struct.h index f286735f31..2c441b541b 100644 --- a/include/base_struct.h +++ b/include/base_struct.h @@ -746,25 +746,24 @@ typedef std::vector< EDA_ITEM* > EDA_ITEMS; // Graphic Text justify: // Values -1,0,1 are used in computations, do not change them -enum GRTextHorizJustifyType { +enum EDA_TEXT_HJUSTIFY_T { GR_TEXT_HJUSTIFY_LEFT = -1, GR_TEXT_HJUSTIFY_CENTER = 0, GR_TEXT_HJUSTIFY_RIGHT = 1 }; -enum GRTextVertJustifyType { - GR_TEXT_VJUSTIFY_TOP = -1, +enum EDA_TEXT_VJUSTIFY_T { + GR_TEXT_VJUSTIFY_TOP = -1, GR_TEXT_VJUSTIFY_CENTER = 0, GR_TEXT_VJUSTIFY_BOTTOM = 1 }; /* Options to show solid segments (segments, texts...) */ -enum GRTraceMode { - FILAIRE = 0, // segments are drawn as lines +enum EDA_DRAW_MODE_T { + LINE = 0, // segments are drawn as lines FILLED, // normal mode: segments have thickness - SKETCH // sketch mode: segments have thickness, but are not - // filled + SKETCH // sketch mode: segments have thickness, but are not filled }; /** @@ -803,8 +802,8 @@ public: int m_Attributs; ///< bit flags such as visible, etc. bool m_Italic; ///< should be italic font (if available) bool m_Bold; ///< should be bold font (if available) - GRTextHorizJustifyType m_HJustify; ///< horizontal justification - GRTextVertJustifyType m_VJustify; ///< vertical justification + EDA_TEXT_HJUSTIFY_T m_HJustify; ///< horizontal justification + EDA_TEXT_VJUSTIFY_T m_VJustify; ///< vertical justification bool m_MultilineAllowed; /**< true to use multiline option, false * to use only single line text @@ -866,12 +865,12 @@ public: * @param aOffset = draw offset (usually (0,0)) * @param aColor = text color * @param aDrawMode = GR_OR, GR_XOR.., -1 to use the current mode. - * @param aDisplay_mode = FILAIRE, FILLED or SKETCH + * @param aDisplay_mode = LINE, FILLED or SKETCH * @param aAnchor_color = anchor color ( UNSPECIFIED_COLOR = do not draw anchor ). */ void Draw( EDA_DRAW_PANEL* aPanel, wxDC* aDC, const wxPoint& aOffset, EDA_Colors aColor, - int aDrawMode, GRTraceMode aDisplay_mode = FILAIRE, + int aDrawMode, EDA_DRAW_MODE_T aDisplay_mode = LINE, EDA_Colors aAnchor_color = UNSPECIFIED_COLOR ); private: @@ -885,14 +884,14 @@ private: * @param aOffset = draw offset (usually (0,0)) * @param aColor = text color * @param aDrawMode = GR_OR, GR_XOR.., -1 to use the current mode. - * @param aFillMode = FILAIRE, FILLED or SKETCH + * @param aFillMode = LINE, FILLED or SKETCH * @param aAnchor_color = anchor color ( UNSPECIFIED_COLOR = do not draw anchor ). * @param aText = the single line of text to draw. * @param aPos = the position of this line ). */ void DrawOneLineOfText( EDA_DRAW_PANEL* aPanel, wxDC* aDC, const wxPoint& aOffset, EDA_Colors aColor, - int aDrawMode, GRTraceMode aFillMode, + int aDrawMode, EDA_DRAW_MODE_T aFillMode, EDA_Colors aAnchor_color, wxString& aText, wxPoint aPos ); @@ -972,10 +971,10 @@ public: */ virtual const wxString GetText() const { return m_Text; } - GRTextHorizJustifyType GetHorizJustify() const { return m_HJustify; }; - GRTextVertJustifyType GetVertJustify() const { return m_VJustify; }; - void SetHorizJustify( GRTextHorizJustifyType aType ) { m_HJustify = aType; }; - void SetVertJustify( GRTextVertJustifyType aType ) { m_VJustify = aType; }; + EDA_TEXT_HJUSTIFY_T GetHorizJustify() const { return m_HJustify; }; + EDA_TEXT_VJUSTIFY_T GetVertJustify() const { return m_VJustify; }; + void SetHorizJustify( EDA_TEXT_HJUSTIFY_T aType ) { m_HJustify = aType; }; + void SetVertJustify( EDA_TEXT_VJUSTIFY_T aType ) { m_VJustify = aType; }; }; #endif // BASE_STRUCT_H_ diff --git a/include/class_base_screen.h b/include/class_base_screen.h index 9c70c07aa4..8b1339e003 100644 --- a/include/class_base_screen.h +++ b/include/class_base_screen.h @@ -76,7 +76,6 @@ typedef std::vector< GRID_TYPE > GRIDS; */ class BASE_SCREEN : public EDA_ITEM { -// EDA_ITEMS m_items; ///< The drawing items associated with this screen. GRIDS m_grids; ///< List of valid grid sizes. EDA_ITEM* m_drawList; ///< Object list for the screen. wxString m_fileName; ///< File used to load the screen. diff --git a/include/drawtxt.h b/include/drawtxt.h index 6ebadf6034..00db99f3b4 100644 --- a/include/drawtxt.h +++ b/include/drawtxt.h @@ -75,8 +75,8 @@ void DrawGraphicText( EDA_DRAW_PANEL * aPanel, const wxString &aText, int aOrient, const wxSize &aSize, - enum GRTextHorizJustifyType aH_justify, - enum GRTextVertJustifyType aV_justify, + enum EDA_TEXT_HJUSTIFY_T aH_justify, + enum EDA_TEXT_VJUSTIFY_T aV_justify, int aWidth, bool aItalic, bool aBold, diff --git a/include/plot_common.h b/include/plot_common.h index 41aa46b316..207669049a 100644 --- a/include/plot_common.h +++ b/include/plot_common.h @@ -121,22 +121,22 @@ public: PLOTTER( PlotFormat aPlotType ); virtual void PlotImage( wxImage & aImage, wxPoint aPos, double aScaleFactor ) = 0; virtual void thick_segment( wxPoint start, wxPoint end, int width, - GRTraceMode tracemode ); + EDA_DRAW_MODE_T tracemode ); virtual void thick_arc( wxPoint centre, int StAngle, int EndAngle, int rayon, - int width, GRTraceMode tracemode ); + int width, EDA_DRAW_MODE_T tracemode ); virtual void thick_rect( wxPoint p1, wxPoint p2, int width, - GRTraceMode tracemode ); + EDA_DRAW_MODE_T tracemode ); virtual void thick_circle( wxPoint pos, int diametre, int width, - GRTraceMode tracemode ); + EDA_DRAW_MODE_T tracemode ); virtual void pen_to( wxPoint pos, char plume ) = 0; // Flash primitives virtual void flash_pad_circle( wxPoint pos, int diametre, - GRTraceMode trace_mode ) = 0; + EDA_DRAW_MODE_T trace_mode ) = 0; virtual void flash_pad_oval( wxPoint pos, wxSize size, int orient, - GRTraceMode trace_mode ) = 0; + EDA_DRAW_MODE_T trace_mode ) = 0; virtual void flash_pad_rect( wxPoint pos, wxSize size, - int orient, GRTraceMode trace_mode ) = 0; + int orient, EDA_DRAW_MODE_T trace_mode ) = 0; /** virtual function flash_pad_trapez * flash a trapezoidal pad @@ -146,7 +146,7 @@ public: PLOTTER( PlotFormat aPlotType ); * @param aTrace_Mode = FILLED or SKETCH */ virtual void flash_pad_trapez( wxPoint aPadPos, wxPoint aCorners[4], - int aPadOrient, GRTraceMode aTrace_Mode ) = 0; + int aPadOrient, EDA_DRAW_MODE_T aTrace_Mode ) = 0; // Convenience functions void move_to( wxPoint pos ) @@ -180,12 +180,13 @@ public: PLOTTER( PlotFormat aPlotType ); const wxString& aText, int aOrient, const wxSize& aSize, - enum GRTextHorizJustifyType aH_justify, - enum GRTextVertJustifyType aV_justify, + enum EDA_TEXT_HJUSTIFY_T aH_justify, + enum EDA_TEXT_VJUSTIFY_T aV_justify, int aWidth, bool aItalic, bool aBold ); - void marker( const wxPoint& position, int diametre, int aShapeId ); + + void marker( const wxPoint& position, int diametre, int aShapeId ); /** * Function SetLayerPolarity @@ -202,7 +203,7 @@ protected: // Helper function for sketched filler segment void segment_as_oval( wxPoint start, wxPoint end, int width, - GRTraceMode tracemode ); + EDA_DRAW_MODE_T tracemode ); void sketch_oval( wxPoint pos, wxSize size, int orient, int width ); virtual void user_to_device_coordinates( wxPoint& pos ); @@ -303,19 +304,19 @@ public: HPGL_PLOTTER() : PLOTTER( PLOT_FORMAT_HPGL ) virtual void PlotImage( wxImage & aImage, wxPoint aPos, double aScaleFactor ); virtual void thick_segment( wxPoint start, wxPoint end, int width, - GRTraceMode tracemode ); + EDA_DRAW_MODE_T tracemode ); virtual void arc( wxPoint centre, int StAngle, int EndAngle, int rayon, FILL_T fill, int width = -1 ); virtual void pen_to( wxPoint pos, char plume ); virtual void flash_pad_circle( wxPoint pos, int diametre, - GRTraceMode trace_mode ); + EDA_DRAW_MODE_T trace_mode ); virtual void flash_pad_oval( wxPoint pos, wxSize size, int orient, - GRTraceMode trace_mode ); + EDA_DRAW_MODE_T trace_mode ); virtual void flash_pad_rect( wxPoint pos, wxSize size, - int orient, GRTraceMode trace_mode ); + int orient, EDA_DRAW_MODE_T trace_mode ); virtual void flash_pad_trapez( wxPoint aPadPos, wxPoint aCorners[4], - int aPadOrient, GRTraceMode aTrace_Mode ); + int aPadOrient, EDA_DRAW_MODE_T aTrace_Mode ); virtual void SetLayerPolarity( bool aPositive ) {} @@ -380,14 +381,14 @@ public: PS_PLOTTER() : PLOTTER( PLOT_FORMAT_POST ) virtual void pen_to( wxPoint pos, char plume ); virtual void flash_pad_circle( wxPoint pos, int diametre, - GRTraceMode trace_mode ); + EDA_DRAW_MODE_T trace_mode ); virtual void flash_pad_oval( wxPoint pos, wxSize size, int orient, - GRTraceMode trace_mode ); + EDA_DRAW_MODE_T trace_mode ); virtual void flash_pad_rect( wxPoint pos, wxSize size, - int orient, GRTraceMode trace_mode ); + int orient, EDA_DRAW_MODE_T trace_mode ); virtual void flash_pad_trapez( wxPoint aPadPos, wxPoint aCorners[4], - int aPadOrient, GRTraceMode aTrace_Mode ); + int aPadOrient, EDA_DRAW_MODE_T aTrace_Mode ); virtual void SetLayerPolarity( bool aPositive ) {} @@ -459,14 +460,14 @@ public: GERBER_PLOTTER() : PLOTTER( PLOT_FORMAT_GERBER ) virtual void pen_to( wxPoint pos, char plume ); virtual void flash_pad_circle( wxPoint pos, int diametre, - GRTraceMode trace_mode ); + EDA_DRAW_MODE_T trace_mode ); virtual void flash_pad_oval( wxPoint pos, wxSize size, int orient, - GRTraceMode trace_mode ); + EDA_DRAW_MODE_T trace_mode ); virtual void flash_pad_rect( wxPoint pos, wxSize size, - int orient, GRTraceMode trace_mode ); + int orient, EDA_DRAW_MODE_T trace_mode ); virtual void flash_pad_trapez( wxPoint aPadPos, wxPoint aCorners[4], - int aPadOrient, GRTraceMode aTrace_Mode ); + int aPadOrient, EDA_DRAW_MODE_T aTrace_Mode ); virtual void SetLayerPolarity( bool aPositive ); @@ -538,19 +539,19 @@ public: DXF_PLOTTER() : PLOTTER( PLOT_FORMAT_DXF ) virtual void PlotImage( wxImage & aImage, wxPoint aPos, double aScaleFactor ); virtual void thick_segment( wxPoint start, wxPoint end, int width, - GRTraceMode tracemode ); + EDA_DRAW_MODE_T tracemode ); virtual void arc( wxPoint centre, int StAngle, int EndAngle, int rayon, FILL_T fill, int width = -1 ); virtual void pen_to( wxPoint pos, char plume ); virtual void flash_pad_circle( wxPoint pos, int diametre, - GRTraceMode trace_mode ); + EDA_DRAW_MODE_T trace_mode ); virtual void flash_pad_oval( wxPoint pos, wxSize size, int orient, - GRTraceMode trace_mode ); + EDA_DRAW_MODE_T trace_mode ); virtual void flash_pad_rect( wxPoint pos, wxSize size, - int orient, GRTraceMode trace_mode ); + int orient, EDA_DRAW_MODE_T trace_mode ); virtual void flash_pad_trapez( wxPoint aPadPos, wxPoint aCorners[4], - int aPadOrient, GRTraceMode aTrace_Mode ); + int aPadOrient, EDA_DRAW_MODE_T aTrace_Mode ); virtual void SetLayerPolarity( bool aPositive ) {} diff --git a/include/wxBasePcbFrame.h b/include/wxBasePcbFrame.h index e0ccdb8aeb..0cffc8a1df 100644 --- a/include/wxBasePcbFrame.h +++ b/include/wxBasePcbFrame.h @@ -507,24 +507,24 @@ public: bool ExportToGerberFile( const wxString& aFullFileName, int aLayer, bool aPlotOriginIsAuxAxis, - GRTraceMode aTraceMode ); + EDA_DRAW_MODE_T aTraceMode ); bool ExportToHpglFile( const wxString& aFullFileName, int aLayer, - GRTraceMode aTraceMode ); + EDA_DRAW_MODE_T aTraceMode ); bool ExportToPostScriptFile( const wxString& aFullFileName, int aLayer, bool aUseA4, - GRTraceMode aTraceMode ); + EDA_DRAW_MODE_T aTraceMode ); bool ExportToDxfFile( const wxString& aFullFileName, int aLayer, - GRTraceMode aTraceMode ); + EDA_DRAW_MODE_T aTraceMode ); - void Plot_Layer( PLOTTER* plotter, - int Layer, - GRTraceMode trace_mode ); + void Plot_Layer( PLOTTER* plotter, + int Layer, + EDA_DRAW_MODE_T trace_mode ); /** * Function Plot_Standard_Layer @@ -540,10 +540,10 @@ public: * have the same size. Used in GERBER format only. */ void Plot_Standard_Layer( PLOTTER* aPlotter, int aLayerMask, - bool aPlotVia, GRTraceMode aPlotMode, + bool aPlotVia, EDA_DRAW_MODE_T aPlotMode, bool aSkipNPTH_Pads = false ); - void PlotSilkScreen( PLOTTER* plotter, int masque_layer, GRTraceMode trace_mode ); + void PlotSilkScreen( PLOTTER* plotter, int masque_layer, EDA_DRAW_MODE_T trace_mode ); /** * Function PlotDrillMark @@ -556,7 +556,7 @@ public: * @param aSmallDrillShape = true to plot a small drill shape, false to * plot the actual drill shape */ - void PlotDrillMark( PLOTTER* aPlotter, GRTraceMode aTraceMode, bool aSmallDrillShape ); + void PlotDrillMark( PLOTTER* aPlotter, EDA_DRAW_MODE_T aTraceMode, bool aSmallDrillShape ); /* Functions relative to Undo/redo commands: */ diff --git a/pcbnew/basepcbframe.cpp b/pcbnew/basepcbframe.cpp index 581b9c8266..93e788c47b 100644 --- a/pcbnew/basepcbframe.cpp +++ b/pcbnew/basepcbframe.cpp @@ -549,12 +549,12 @@ void PCB_BASE_FRAME::LoadSettings() cfg->Read( m_FrameName + FastGrid2Entry, &itmp, ( long )0); m_FastGrid2 = itmp; - if( m_DisplayModEdge < FILAIRE || m_DisplayModEdge > SKETCH ) + if( m_DisplayModEdge < LINE || m_DisplayModEdge > SKETCH ) m_DisplayModEdge = FILLED; cfg->Read( m_FrameName + DisplayModuleTextEntry, &m_DisplayModText, ( long )FILLED ); - if( m_DisplayModText < FILAIRE || m_DisplayModText > SKETCH ) + if( m_DisplayModText < LINE || m_DisplayModText > SKETCH ) m_DisplayModText = FILLED; // WxWidgets 2.9.1 seems call setlocale( LC_NUMERIC, "" ) diff --git a/pcbnew/class_dimension.cpp b/pcbnew/class_dimension.cpp index 02c58bcc15..6960f5cc50 100644 --- a/pcbnew/class_dimension.cpp +++ b/pcbnew/class_dimension.cpp @@ -347,11 +347,11 @@ void DIMENSION::Draw( EDA_DRAW_PANEL* panel, wxDC* DC, int mode_color, const wxP width = m_Width; if( DC->LogicalToDeviceXRel( width ) < 2 ) - typeaff = FILAIRE; + typeaff = LINE; switch( typeaff ) { - case FILAIRE: + case LINE: width = 0; case FILLED: diff --git a/pcbnew/class_drawsegment.cpp b/pcbnew/class_drawsegment.cpp index 3babf3f511..187ec05fed 100644 --- a/pcbnew/class_drawsegment.cpp +++ b/pcbnew/class_drawsegment.cpp @@ -187,14 +187,14 @@ void DRAWSEGMENT::Draw( EDA_DRAW_PANEL* panel, wxDC* DC, int draw_mode, const wx mode = SKETCH; if( l_trace < DC->DeviceToLogicalXRel( MIN_DRAW_WIDTH ) ) - mode = FILAIRE; + mode = LINE; switch( m_Shape ) { case S_CIRCLE: radius = (int) hypot( (double) (dx - ux0), (double) (dy - uy0) ); - if( mode == FILAIRE ) + if( mode == LINE ) { GRCircle( panel->GetClipBox(), DC, ux0, uy0, radius, color ); } @@ -228,9 +228,8 @@ void DRAWSEGMENT::Draw( EDA_DRAW_PANEL* panel, wxDC* DC, int draw_mode, const wx } - if( mode == FILAIRE ) - GRArc( panel->GetClipBox(), DC, ux0, uy0, StAngle, EndAngle, - radius, color ); + if( mode == LINE ) + GRArc( panel->GetClipBox(), DC, ux0, uy0, StAngle, EndAngle, radius, color ); else if( mode == SKETCH ) { @@ -249,7 +248,7 @@ void DRAWSEGMENT::Draw( EDA_DRAW_PANEL* panel, wxDC* DC, int draw_mode, const wx m_BezierPoints = Bezier2Poly(m_Start,m_BezierC1, m_BezierC2, m_End); for (unsigned int i=1; i < m_BezierPoints.size(); i++) { - if( mode == FILAIRE ) + if( mode == LINE ) GRLine( panel->GetClipBox(), DC, m_BezierPoints[i].x, m_BezierPoints[i].y, m_BezierPoints[i-1].x, m_BezierPoints[i-1].y, 0, @@ -271,7 +270,7 @@ void DRAWSEGMENT::Draw( EDA_DRAW_PANEL* panel, wxDC* DC, int draw_mode, const wx } break; default: - if( mode == FILAIRE ) + if( mode == LINE ) { GRLine( panel->GetClipBox(), DC, ux0, uy0, dx, dy, 0, color ); } diff --git a/pcbnew/class_edge_mod.cpp b/pcbnew/class_edge_mod.cpp index 6f586bc84f..81d7a3ff49 100644 --- a/pcbnew/class_edge_mod.cpp +++ b/pcbnew/class_edge_mod.cpp @@ -119,12 +119,12 @@ void EDGE_MODULE::Draw( EDA_DRAW_PANEL* panel, wxDC* DC, int draw_mode, const wx } if( DC->LogicalToDeviceXRel( m_Width ) < MIN_DRAW_WIDTH ) - typeaff = FILAIRE; + typeaff = LINE; switch( type_trace ) { case S_SEGMENT: - if( typeaff == FILAIRE ) + if( typeaff == LINE ) GRLine( panel->GetClipBox(), DC, ux0, uy0, dx, dy, 0, color ); else if( typeaff == FILLED ) GRLine( panel->GetClipBox(), DC, ux0, uy0, dx, dy, m_Width, color ); @@ -137,7 +137,7 @@ void EDGE_MODULE::Draw( EDA_DRAW_PANEL* panel, wxDC* DC, int draw_mode, const wx case S_CIRCLE: radius = (int) hypot( (double) (dx - ux0), (double) (dy - uy0) ); - if( typeaff == FILAIRE ) + if( typeaff == LINE ) { GRCircle( panel->GetClipBox(), DC, ux0, uy0, radius, color ); } @@ -164,7 +164,7 @@ void EDGE_MODULE::Draw( EDA_DRAW_PANEL* panel, wxDC* DC, int draw_mode, const wx if( StAngle > EndAngle ) EXCHG( StAngle, EndAngle ); - if( typeaff == FILAIRE ) + if( typeaff == LINE ) { GRArc( panel->GetClipBox(), DC, ux0, uy0, StAngle, EndAngle, radius, color ); } diff --git a/pcbnew/class_mire.cpp b/pcbnew/class_mire.cpp index 3fd1525a32..2bd3867c00 100644 --- a/pcbnew/class_mire.cpp +++ b/pcbnew/class_mire.cpp @@ -88,13 +88,13 @@ void PCB_TARGET::Draw( EDA_DRAW_PANEL* panel, wxDC* DC, int mode_color, const wx width = m_Width; if( DC->LogicalToDeviceXRel( width ) < 2 ) - typeaff = FILAIRE; + typeaff = LINE; radius = m_Size / 4; switch( typeaff ) { - case FILAIRE: + case LINE: width = 0; case FILLED: @@ -123,7 +123,7 @@ void PCB_TARGET::Draw( EDA_DRAW_PANEL* panel, wxDC* DC, int mode_color, const wx switch( typeaff ) { - case FILAIRE: + case LINE: case FILLED: GRLine( panel->GetClipBox(), DC, ox - dx1, oy - dy1, ox + dx1, oy + dy1, width, gcolor ); GRLine( panel->GetClipBox(), DC, ox - dx2, oy - dy2, ox + dx2, oy + dy2, width, gcolor ); diff --git a/pcbnew/class_pcb_text.cpp b/pcbnew/class_pcb_text.cpp index 71b5ea812c..c7235784a6 100644 --- a/pcbnew/class_pcb_text.cpp +++ b/pcbnew/class_pcb_text.cpp @@ -66,7 +66,8 @@ void TEXTE_PCB::Draw( EDA_DRAW_PANEL* panel, wxDC* DC, int color = brd->GetLayerColor( m_Layer ); - GRTraceMode fillmode = FILLED; + EDA_DRAW_MODE_T fillmode = FILLED; + if( DisplayOpt.DisplayDrawItems == SKETCH ) fillmode = SKETCH; diff --git a/pcbnew/class_text_mod.cpp b/pcbnew/class_text_mod.cpp index 36deed2eb5..2b9ea2bcaf 100644 --- a/pcbnew/class_text_mod.cpp +++ b/pcbnew/class_text_mod.cpp @@ -238,7 +238,7 @@ void TEXTE_MODULE::Draw( EDA_DRAW_PANEL* panel, wxDC* DC, int draw_mode, const w orient = GetDrawRotation(); width = m_Thickness; - if( ( frame->m_DisplayModText == FILAIRE ) + if( ( frame->m_DisplayModText == LINE ) || ( DC->LogicalToDeviceXRel( width ) < MIN_DRAW_WIDTH ) ) width = 0; else if( frame->m_DisplayModText == SKETCH ) diff --git a/pcbnew/dialogs/dialog_pcb_text_properties.cpp b/pcbnew/dialogs/dialog_pcb_text_properties.cpp index 52d97f6031..1056f0baea 100644 --- a/pcbnew/dialogs/dialog_pcb_text_properties.cpp +++ b/pcbnew/dialogs/dialog_pcb_text_properties.cpp @@ -149,7 +149,7 @@ void DIALOG_PCB_TEXT_PROPERTIES::MyInit() m_StyleCtrl->SetSelection( 0 ); // Set justification - GRTextHorizJustifyType hJustify = m_SelectedPCBText->GetHorizJustify(); + EDA_TEXT_HJUSTIFY_T hJustify = m_SelectedPCBText->GetHorizJustify(); m_justifyChoice->SetSelection( (int) hJustify + 1 ); // Set focus on most important control diff --git a/pcbnew/gen_drill_report_files.cpp b/pcbnew/gen_drill_report_files.cpp index 7b13e26588..8e22ebf06e 100644 --- a/pcbnew/gen_drill_report_files.cpp +++ b/pcbnew/gen_drill_report_files.cpp @@ -274,7 +274,7 @@ void Gen_Drill_PcbMap( BOARD* aPcb, PLOTTER* aPlotter, wxSize oblong_size; oblong_size = aHoleListBuffer[ii].m_Hole_Size; aPlotter->flash_pad_oval( pos, oblong_size, - aHoleListBuffer[ii].m_Hole_Orient, FILAIRE ); + aHoleListBuffer[ii].m_Hole_Orient, LINE ); } } } diff --git a/pcbnew/kicad_plugin.cpp b/pcbnew/kicad_plugin.cpp index 5bd9f92dc8..88275675b2 100644 --- a/pcbnew/kicad_plugin.cpp +++ b/pcbnew/kicad_plugin.cpp @@ -1767,7 +1767,7 @@ void KICAD_PLUGIN::loadPCB_TEXT() pcbtxt->SetTimeStamp( timestamp ); pcbtxt->SetItalic( !strcmp( style, "Italic" ) ); - GRTextHorizJustifyType hj; + EDA_TEXT_HJUSTIFY_T hj; if( hJustify ) { @@ -1780,7 +1780,9 @@ void KICAD_PLUGIN::loadPCB_TEXT() } } else + { hj = GR_TEXT_HJUSTIFY_CENTER; + } pcbtxt->SetHorizJustify( hj ); diff --git a/pcbnew/pcb_plot_params.cpp b/pcbnew/pcb_plot_params.cpp index d4d8fbece5..71e493fa72 100644 --- a/pcbnew/pcb_plot_params.cpp +++ b/pcbnew/pcb_plot_params.cpp @@ -319,7 +319,7 @@ void PCB_PLOT_PARAMS_PARSER::Parse( PCB_PLOT_PARAMS* aPcbPlotParams ) throw( IO_ aPcbPlotParams->m_PlotViaOnMaskLayer = ParseBool(); break; case T_mode: - aPcbPlotParams->m_PlotMode = (GRTraceMode)ParseInt( 0, 2 ); + aPcbPlotParams->m_PlotMode = (EDA_DRAW_MODE_T)ParseInt( 0, 2 ); break; case T_useauxorigin: aPcbPlotParams->useAuxOrigin = ParseBool(); diff --git a/pcbnew/pcb_plot_params.h b/pcbnew/pcb_plot_params.h index 0d9a6c677e..e7a06c93df 100644 --- a/pcbnew/pcb_plot_params.h +++ b/pcbnew/pcb_plot_params.h @@ -49,7 +49,7 @@ public: bool m_PlotFrameRef; // True to plot/print frame references bool m_PlotViaOnMaskLayer; // True if vias are drawn on Mask layer // (ie protected by mask) - GRTraceMode m_PlotMode; // = FILAIRE, FILLED or SKETCH: select how to plot filled objects. + EDA_DRAW_MODE_T m_PlotMode; // LINE, FILLED or SKETCH: select how to plot filled objects. // depending on plot format or layers, all options are not always allowed int m_HPGLPenNum; int m_HPGLPenSpeed; diff --git a/pcbnew/pcbplot.cpp b/pcbnew/pcbplot.cpp index db9b20f6f4..385bc035e6 100644 --- a/pcbnew/pcbplot.cpp +++ b/pcbnew/pcbplot.cpp @@ -434,7 +434,7 @@ void DIALOG_PLOT::applyPlotSettings() tempOptions.m_DrillShapeOpt = (PCB_PLOT_PARAMS::DrillShapeOptT) m_drillShapeOpt->GetSelection(); tempOptions.m_PlotMirror = m_plotMirrorOpt->GetValue(); - tempOptions.m_PlotMode = (GRTraceMode) m_plotModeOpt->GetSelection(); + tempOptions.m_PlotMode = (EDA_DRAW_MODE_T) m_plotModeOpt->GetSelection(); tempOptions.m_PlotViaOnMaskLayer = m_plotNoViaOnMaskOpt->GetValue(); // Update settings from text fields. Rewrite values back to the fields, diff --git a/pcbnew/pcbplot.h b/pcbnew/pcbplot.h index 66f475d587..da690cc504 100644 --- a/pcbnew/pcbplot.h +++ b/pcbnew/pcbplot.h @@ -38,24 +38,24 @@ class ZONE_CONTAINER; void PlotTextePcb( PLOTTER* plotter, TEXTE_PCB* pt_texte, int masque_layer, - GRTraceMode trace_mode ); + EDA_DRAW_MODE_T trace_mode ); /* Plat PCB text type, ie other than text on modules * prepare the plot settings of text */ void PlotDrawSegment( PLOTTER* plotter, DRAWSEGMENT* PtSegm, int masque_layer, - GRTraceMode trace_mode ); + EDA_DRAW_MODE_T trace_mode ); void PlotDimension( PLOTTER* plotter, DIMENSION* Dimension, int masque_layer, - GRTraceMode trace_mode ); + EDA_DRAW_MODE_T trace_mode ); void PlotPcbTarget( PLOTTER* plotter, PCB_TARGET* PtMire, int masque_layer, - GRTraceMode trace_mode ); + EDA_DRAW_MODE_T trace_mode ); void Plot_1_EdgeModule( PLOTTER* plotter, EDGE_MODULE* PtEdge, - GRTraceMode trace_mode ); + EDA_DRAW_MODE_T trace_mode ); void PlotFilledAreas( PLOTTER* plotter, ZONE_CONTAINER* aZone, - GRTraceMode trace_mode ); + EDA_DRAW_MODE_T trace_mode ); /* PLOTGERB.CPP */ void SelectD_CODE_For_LineDraw( PLOTTER* plotter, int aSize ); diff --git a/pcbnew/plot_rtn.cpp b/pcbnew/plot_rtn.cpp index d8ea56f39f..b123279bd1 100644 --- a/pcbnew/plot_rtn.cpp +++ b/pcbnew/plot_rtn.cpp @@ -28,14 +28,14 @@ #include "pcbplot.h" static void Plot_Edges_Modules( PLOTTER* plotter, BOARD* pcb, int aLayerMask, - GRTraceMode trace_mode ); + EDA_DRAW_MODE_T trace_mode ); static void PlotTextModule( PLOTTER* plotter, TEXTE_MODULE* pt_texte, - GRTraceMode trace_mode ); + EDA_DRAW_MODE_T trace_mode ); /* Creates the plot for silkscreen layers */ -void PCB_BASE_FRAME::PlotSilkScreen( PLOTTER* plotter, int aLayerMask, GRTraceMode trace_mode ) +void PCB_BASE_FRAME::PlotSilkScreen( PLOTTER* plotter, int aLayerMask, EDA_DRAW_MODE_T trace_mode ) { bool trace_val, trace_ref; TEXTE_MODULE* pt_texte; @@ -97,24 +97,24 @@ void PCB_BASE_FRAME::PlotSilkScreen( PLOTTER* plotter, int aLayerMask, GRTraceMo switch( pad->m_PadShape & 0x7F ) { case PAD_CIRCLE: - plotter->flash_pad_circle( shape_pos, pad->m_Size.x, FILAIRE ); + plotter->flash_pad_circle( shape_pos, pad->m_Size.x, LINE ); break; case PAD_OVAL: - plotter->flash_pad_oval( shape_pos, pad->m_Size, pad->m_Orient, FILAIRE ); + plotter->flash_pad_oval( shape_pos, pad->m_Size, pad->m_Orient, LINE ); break; case PAD_TRAPEZOID: { wxPoint coord[4]; pad->BuildPadPolygon( coord, wxSize(0,0), 0 ); - plotter->flash_pad_trapez( shape_pos, coord, pad->m_Orient, FILAIRE ); + plotter->flash_pad_trapez( shape_pos, coord, pad->m_Orient, LINE ); break; } case PAD_RECT: default: - plotter->flash_pad_rect( shape_pos, pad->m_Size, pad->m_Orient, FILAIRE ); + plotter->flash_pad_rect( shape_pos, pad->m_Size, pad->m_Orient, LINE ); break; } } @@ -232,7 +232,7 @@ for module\n %s's \"module text\" text of %s." ), } -static void PlotTextModule( PLOTTER* plotter, TEXTE_MODULE* pt_texte, GRTraceMode trace_mode ) +static void PlotTextModule( PLOTTER* plotter, TEXTE_MODULE* pt_texte, EDA_DRAW_MODE_T trace_mode ) { wxSize size; wxPoint pos; @@ -246,7 +246,7 @@ static void PlotTextModule( PLOTTER* plotter, TEXTE_MODULE* pt_texte, GRTraceMod thickness = pt_texte->m_Thickness; - if( trace_mode == FILAIRE ) + if( trace_mode == LINE ) thickness = -1; if( pt_texte->m_Mirror ) @@ -267,14 +267,14 @@ static void PlotTextModule( PLOTTER* plotter, TEXTE_MODULE* pt_texte, GRTraceMod void PlotDimension( PLOTTER* plotter, DIMENSION* aDim, int aLayerMask, - GRTraceMode trace_mode ) + EDA_DRAW_MODE_T trace_mode ) { if( (GetLayerMask( aDim->GetLayer() ) & aLayerMask) == 0 ) return; DRAWSEGMENT draw; - draw.SetWidth( (trace_mode==FILAIRE) ? -1 : aDim->GetWidth() ); + draw.SetWidth( (trace_mode==LINE) ? -1 : aDim->GetWidth() ); draw.SetLayer( aDim->GetLayer() ); PlotTextePcb( plotter, &aDim->m_Text, aLayerMask, trace_mode ); @@ -309,7 +309,8 @@ void PlotDimension( PLOTTER* plotter, DIMENSION* aDim, int aLayerMask, } -void PlotPcbTarget( PLOTTER* plotter, PCB_TARGET* aMire, int aLayerMask, GRTraceMode trace_mode ) +void PlotPcbTarget( PLOTTER* plotter, PCB_TARGET* aMire, int aLayerMask, + EDA_DRAW_MODE_T trace_mode ) { int dx1, dx2, dy1, dy2, radius; @@ -319,7 +320,7 @@ void PlotPcbTarget( PLOTTER* plotter, PCB_TARGET* aMire, int aLayerMask, GRTrace DRAWSEGMENT draw; draw.SetShape( S_CIRCLE ); - draw.SetWidth( ( trace_mode == FILAIRE ) ? -1 : aMire->GetWidth() ); + draw.SetWidth( ( trace_mode == LINE ) ? -1 : aMire->GetWidth() ); draw.SetLayer( aMire->GetLayer() ); draw.SetStart( aMire->GetPosition() ); @@ -354,7 +355,7 @@ void PlotPcbTarget( PLOTTER* plotter, PCB_TARGET* aMire, int aLayerMask, GRTrace /* Plot footprints graphic items (outlines) */ -void Plot_Edges_Modules( PLOTTER* plotter, BOARD* pcb, int aLayerMask, GRTraceMode trace_mode ) +void Plot_Edges_Modules( PLOTTER* plotter, BOARD* pcb, int aLayerMask, EDA_DRAW_MODE_T trace_mode ) { for( MODULE* module = pcb->m_Modules; module; module = module->Next() ) { @@ -375,7 +376,7 @@ void Plot_Edges_Modules( PLOTTER* plotter, BOARD* pcb, int aLayerMask, GRTraceMo /** Plot a graphic item (outline) relative to a footprint */ -void Plot_1_EdgeModule( PLOTTER* plotter, EDGE_MODULE* aEdge, GRTraceMode trace_mode ) +void Plot_1_EdgeModule( PLOTTER* plotter, EDGE_MODULE* aEdge, EDA_DRAW_MODE_T trace_mode ) { int type_trace; // Type of item to plot. int thickness; // Segment thickness. @@ -456,7 +457,8 @@ void Plot_1_EdgeModule( PLOTTER* plotter, EDGE_MODULE* aEdge, GRTraceMode trace_ /* Plot a PCB Text, i;e. a text found on a copper or technical layer */ -void PlotTextePcb( PLOTTER* plotter, TEXTE_PCB* pt_texte, int aLayerMask, GRTraceMode trace_mode ) +void PlotTextePcb( PLOTTER* plotter, TEXTE_PCB* pt_texte, int aLayerMask, + EDA_DRAW_MODE_T trace_mode ) { int orient, thickness; wxPoint pos; @@ -471,7 +473,7 @@ void PlotTextePcb( PLOTTER* plotter, TEXTE_PCB* pt_texte, int aLayerMask, GRTrac size = pt_texte->m_Size; pos = pt_texte->m_Pos; orient = pt_texte->m_Orient; - thickness = ( trace_mode==FILAIRE ) ? -1 : pt_texte->m_Thickness; + thickness = ( trace_mode==LINE ) ? -1 : pt_texte->m_Thickness; if( pt_texte->m_Mirror ) size.x = -size.x; @@ -517,7 +519,7 @@ void PlotTextePcb( PLOTTER* plotter, TEXTE_PCB* pt_texte, int aLayerMask, GRTrac /* Plot areas (given by .m_FilledPolysList member) in a zone */ -void PlotFilledAreas( PLOTTER* plotter, ZONE_CONTAINER* aZone, GRTraceMode trace_mode ) +void PlotFilledAreas( PLOTTER* plotter, ZONE_CONTAINER* aZone, EDA_DRAW_MODE_T trace_mode ) { unsigned imax = aZone->m_FilledPolysList.size(); @@ -578,7 +580,7 @@ void PlotFilledAreas( PLOTTER* plotter, ZONE_CONTAINER* aZone, GRTraceMode trace { for( unsigned jj = 1; jjthick_segment( cornerList[jj -1], cornerList[jj], - ( trace_mode == FILAIRE ) ? -1 : aZone->m_ZoneMinThickness, + ( trace_mode == LINE ) ? -1 : aZone->m_ZoneMinThickness, trace_mode ); } @@ -594,7 +596,7 @@ void PlotFilledAreas( PLOTTER* plotter, ZONE_CONTAINER* aZone, GRTraceMode trace /* Plot items type DRAWSEGMENT on layers allowed by aLayerMask */ void PlotDrawSegment( PLOTTER* plotter, DRAWSEGMENT* aSeg, int aLayerMask, - GRTraceMode trace_mode ) + EDA_DRAW_MODE_T trace_mode ) { int thickness; int radius = 0, StAngle = 0, EndAngle = 0; @@ -602,7 +604,7 @@ void PlotDrawSegment( PLOTTER* plotter, DRAWSEGMENT* aSeg, int aLayerMask, if( (GetLayerMask( aSeg->GetLayer() ) & aLayerMask) == 0 ) return; - if( trace_mode == FILAIRE ) + if( trace_mode == LINE ) thickness = g_PcbPlotOptions.m_PlotLineWidth; else thickness = aSeg->GetWidth(); @@ -646,7 +648,7 @@ void PlotDrawSegment( PLOTTER* plotter, DRAWSEGMENT* aSeg, int aLayerMask, } -void PCB_BASE_FRAME::Plot_Layer( PLOTTER* plotter, int Layer, GRTraceMode trace_mode ) +void PCB_BASE_FRAME::Plot_Layer( PLOTTER* plotter, int Layer, EDA_DRAW_MODE_T trace_mode ) { // Specify that the contents of the "Edges Pcb" layer are to be plotted // in addition to the contents of the currently specified layer. @@ -734,11 +736,11 @@ void PCB_BASE_FRAME::Plot_Layer( PLOTTER* plotter, int Layer, GRTraceMode trace_ /* Plot a copper layer or mask in HPGL format. * HPGL unit = 0.98 mils (1 mil = 1.02041 unit HPGL). */ -void PCB_BASE_FRAME::Plot_Standard_Layer( PLOTTER* aPlotter, - int aLayerMask, - bool aPlotVia, - GRTraceMode aPlotMode, - bool aSkipNPTH_Pads ) +void PCB_BASE_FRAME::Plot_Standard_Layer( PLOTTER* aPlotter, + int aLayerMask, + bool aPlotVia, + EDA_DRAW_MODE_T aPlotMode, + bool aSkipNPTH_Pads ) { wxPoint pos; wxSize size; @@ -967,9 +969,9 @@ void PCB_BASE_FRAME::Plot_Standard_Layer( PLOTTER* aPlotter, * @param aSmallDrillShape = true to plot a small drill shape, false to plot * the actual drill shape */ -void PCB_BASE_FRAME::PlotDrillMark( PLOTTER* aPlotter, - GRTraceMode aTraceMode, - bool aSmallDrillShape ) +void PCB_BASE_FRAME::PlotDrillMark( PLOTTER* aPlotter, + EDA_DRAW_MODE_T aTraceMode, + bool aSmallDrillShape ) { wxPoint pos; wxSize diam; diff --git a/pcbnew/plotdxf.cpp b/pcbnew/plotdxf.cpp index 06e3801250..033dffd8b5 100644 --- a/pcbnew/plotdxf.cpp +++ b/pcbnew/plotdxf.cpp @@ -16,7 +16,7 @@ bool PCB_BASE_FRAME::ExportToDxfFile( const wxString& aFullFileName, int aLayer, - GRTraceMode aTraceMode ) + EDA_DRAW_MODE_T aTraceMode ) { Ki_PageDescr* currentsheet = GetScreen()->m_CurrentSheetDesc; diff --git a/pcbnew/plotgerb.cpp b/pcbnew/plotgerb.cpp index 9e90b4cb85..8a1084df09 100644 --- a/pcbnew/plotgerb.cpp +++ b/pcbnew/plotgerb.cpp @@ -24,7 +24,7 @@ bool PCB_BASE_FRAME::ExportToGerberFile( const wxString& aFullFileName, int aLayer, - bool aPlotOriginIsAuxAxis, GRTraceMode aTraceMode ) + bool aPlotOriginIsAuxAxis, EDA_DRAW_MODE_T aTraceMode ) { FILE* output_file = wxFopen( aFullFileName, wxT( "wt" ) ); diff --git a/pcbnew/plothpgl.cpp b/pcbnew/plothpgl.cpp index 2337905c45..2ffa973f35 100644 --- a/pcbnew/plothpgl.cpp +++ b/pcbnew/plothpgl.cpp @@ -18,7 +18,7 @@ bool PCB_BASE_FRAME::ExportToHpglFile( const wxString& aFullFileName, int aLayer, - GRTraceMode aTraceMode ) + EDA_DRAW_MODE_T aTraceMode ) { wxSize SheetSize; wxSize BoardSize; diff --git a/pcbnew/plotps.cpp b/pcbnew/plotps.cpp index 1e9a427f88..7ef143ca21 100644 --- a/pcbnew/plotps.cpp +++ b/pcbnew/plotps.cpp @@ -22,7 +22,7 @@ * If layer < 0: all layers are plotted. */ bool PCB_BASE_FRAME::ExportToPostScriptFile( const wxString& aFullFileName, int aLayer, - bool aUseA4, GRTraceMode aTraceMode ) + bool aUseA4, EDA_DRAW_MODE_T aTraceMode ) { wxSize SheetSize; wxSize PaperSize;