Commit 55526a10 authored by Baranovskiy Konstantin's avatar Baranovskiy Konstantin Committed by Wayne Stambaugh

DXF plot layer color bug fix. (fixes lp:1126403)

parent ee2ed120
...@@ -171,30 +171,30 @@ bool DXF_PLOTTER::StartPlot() ...@@ -171,30 +171,30 @@ bool DXF_PLOTTER::StartPlot()
const char *name; const char *name;
int color; int color;
} dxf_layer[NBCOLOR] = { } dxf_layer[NBCOLOR] = {
{ "Black", 250 }, { "BLACK", 250 },
{ "Blue", 5 }, { "BLUE", 5 },
{ "Green", 3 }, { "GREEN", 3 },
{ "Cyan", 4 }, { "CYAN", 4 },
{ "Red", 1 }, { "RED", 1 },
{ "Magenta", 6 }, { "MAGENTA", 6 },
{ "Brown", 54 }, { "BROWN", 54 },
{ "LightGray", 9 }, { "LIGHTGRAY", 9 },
{ "DarkGray", 8 }, { "DARKGRAY", 8 },
{ "LightBlue", 171 }, { "LIGHTBLUE", 171 },
{ "LightGreen", 91 }, { "LIGHTGREEN", 91 },
{ "LightCyan", 131 }, { "LIGHTCYAN", 131 },
{ "LightRed", 11 }, { "LIGHTRED", 11 },
{ "LightMagenta", 221 }, { "LIGHTMAGENTA", 221 },
{ "Yellow", 2 }, { "YELLOW", 2 },
{ "White", 7 }, { "WHITE", 7 },
{ "DarkDarkGray", 251 }, { "DARKDARKGRAY", 251 },
{ "DarkBlue", 178 }, { "DARKBLUE", 178 },
{ "DarkGreen", 98 }, { "DARKGREEN", 98 },
{ "DarkCyan", 138 }, { "DARKCYAN", 138 },
{ "DarkRed", 18 }, { "DARKRED", 18 },
{ "DarkMagenta", 228 }, { "DARKMAGENTA", 228 },
{ "DarkBrown", 58 }, { "DARKBROWN", 58 },
{ "LightYellow", 51 }, { "LIGHTYELLOW", 51 },
}; };
for( int i = 0; i < NBCOLOR; i++ ) for( int i = 0; i < NBCOLOR; i++ )
...@@ -256,6 +256,8 @@ void DXF_PLOTTER::SetColor( EDA_COLOR_T color ) ...@@ -256,6 +256,8 @@ void DXF_PLOTTER::SetColor( EDA_COLOR_T color )
{ {
currentColor = color; currentColor = color;
} }
else
currentColor = BLACK;
} }
/** /**
...@@ -567,8 +569,7 @@ void DXF_PLOTTER::Text( const wxPoint& aPos, ...@@ -567,8 +569,7 @@ void DXF_PLOTTER::Text( const wxPoint& aPos,
/* Emit text as a text entity. This loses formatting and shape but it's /* Emit text as a text entity. This loses formatting and shape but it's
more useful as a CAD object */ more useful as a CAD object */
DPOINT origin_dev = userToDeviceCoordinates( aPos ); DPOINT origin_dev = userToDeviceCoordinates( aPos );
if( aColor >= 0 ) SetColor( aColor );
currentColor = aColor;
wxString cname = ColorRefs[currentColor].m_Name; wxString cname = ColorRefs[currentColor].m_Name;
DPOINT size_dev = userToDeviceSize( aSize ); DPOINT size_dev = userToDeviceSize( aSize );
int h_code = 0, v_code = 0; int h_code = 0, v_code = 0;
......
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