Commit b774d96f authored by Wayne Stambaugh's avatar Wayne Stambaugh

Minor coding policy and code readability improvements.

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