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

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

parent ee2ed120
Loading
Loading
Loading
Loading
+27 −26
Original line number Diff line number Diff line
@@ -171,30 +171,30 @@ bool DXF_PLOTTER::StartPlot()
        const char *name;
        int color;
    } dxf_layer[NBCOLOR] = {
        { "Black",              250 },
        { "Blue",               5 },
        { "Green",              3 },
        { "Cyan",               4 },
        { "Red",                1 },
        { "Magenta",            6 },
        { "Brown",              54 },
        { "LightGray",          9 },
        { "DarkGray",           8 },
        { "LightBlue",          171 },
        { "LightGreen",         91 },
        { "LightCyan",          131 },
        { "LightRed",           11 },
        { "LightMagenta",       221 },
        { "Yellow",             2 },
        { "White",              7 },
        { "DarkDarkGray",       251 },
        { "DarkBlue",           178 },
        { "DarkGreen",          98 },
        { "DarkCyan",           138 },
        { "DarkRed",            18 },
        { "DarkMagenta",        228 },
        { "DarkBrown",          58 },
        { "LightYellow",        51 },
        { "BLACK",              250 },
        { "BLUE",               5 },
        { "GREEN",              3 },
        { "CYAN",               4 },
        { "RED",                1 },
        { "MAGENTA",            6 },
        { "BROWN",              54 },
        { "LIGHTGRAY",          9 },
        { "DARKGRAY",           8 },
        { "LIGHTBLUE",          171 },
        { "LIGHTGREEN",         91 },
        { "LIGHTCYAN",          131 },
        { "LIGHTRED",           11 },
        { "LIGHTMAGENTA",       221 },
        { "YELLOW",             2 },
        { "WHITE",              7 },
        { "DARKDARKGRAY",       251 },
        { "DARKBLUE",           178 },
        { "DARKGREEN",          98 },
        { "DARKCYAN",           138 },
        { "DARKRED",            18 },
        { "DARKMAGENTA",        228 },
        { "DARKBROWN",          58 },
        { "LIGHTYELLOW",        51 },
    };

    for( int i = 0; i < NBCOLOR; i++ )
@@ -256,6 +256,8 @@ void DXF_PLOTTER::SetColor( EDA_COLOR_T color )
    {
        currentColor = color;
    }
    else
        currentColor = BLACK;
}

/**
@@ -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
           more useful as a CAD object */
        DPOINT origin_dev = userToDeviceCoordinates( aPos );
        if( aColor >= 0 )
            currentColor = aColor;
        SetColor( aColor );
        wxString cname = ColorRefs[currentColor].m_Name;
        DPOINT size_dev = userToDeviceSize( aSize );
        int h_code = 0, v_code = 0;