diff --git a/common/class_colors_design_settings.cpp b/common/class_colors_design_settings.cpp index ebb3295280..952b958ba3 100644 --- a/common/class_colors_design_settings.cpp +++ b/common/class_colors_design_settings.cpp @@ -61,10 +61,10 @@ static const EDA_COLOR_T default_layer_color[] = { LIGHTGRAY, BLUE, GREEN, YELLOW, // Dwgs_User, Cmts_User, Eco1_User, Eco2_User // Special layers - YELLOW, // Edge_Cuts - LIGHTMAGENTA, // Margin - DARKGRAY, LIGHTGRAY, // B_CrtYd, F_CrtYd, - BLUE, DARKGRAY // B_Fab, F_Fab + YELLOW, // Edge_Cuts + LIGHTMAGENTA, // Margin + DARKGRAY, LIGHTGRAY, // B_CrtYd, F_CrtYd, + BLUE, DARKGRAY // B_Fab, F_Fab }; diff --git a/pcbnew/class_board.cpp b/pcbnew/class_board.cpp index cc04450a52..1b3d1551ef 100644 --- a/pcbnew/class_board.cpp +++ b/pcbnew/class_board.cpp @@ -66,6 +66,12 @@ */ wxPoint BOARD_ITEM::ZeroOffset( 0, 0 ); +// this is a dummy colors settings (defined colors are the vdefulat values) +// used to initialize the board. +// these settings will be overriden later, depending on the draw frame that displays the board. +// However, when a board is created by a python script, outside a frame, the colors must be set +// so dummyColorsSettings provide this default initialization +static COLORS_DESIGN_SETTINGS dummyColorsSettings( FRAME_PCB ); BOARD::BOARD() : BOARD_ITEM_CONTAINER( (BOARD_ITEM*) NULL, PCB_T ), @@ -74,6 +80,7 @@ BOARD::BOARD() : // we have not loaded a board yet, assume latest until then. m_fileFormatVersionAtLoad = LEGACY_BOARD_FILE_VERSION; + m_colorsSettings = &dummyColorsSettings; m_Status_Pcb = 0; // Status word: bit 1 = calculate. m_CurrentZoneContour = NULL; // This ZONE_CONTAINER handle the // zone contour currently in progress diff --git a/pcbnew/plot_brditems_plotter.cpp b/pcbnew/plot_brditems_plotter.cpp index a4b73b15f6..8358e69204 100644 --- a/pcbnew/plot_brditems_plotter.cpp +++ b/pcbnew/plot_brditems_plotter.cpp @@ -57,8 +57,12 @@ COLOR4D BRDITEMS_PLOTTER::getColor( LAYER_NUM aLayer ) { COLOR4D color = m_board->Colors().GetLayerColor( ToLAYER_ID( aLayer ) ); + + // A hack to avoid plotting ahite itmen in white color, expecting the paper + // is also white: use a non white color: if( color == COLOR4D::WHITE ) color = COLOR4D( LIGHTGRAY ); + return color; }