void EDA_DRAW_PANEL_GAL::SetHighContrastLayer( LAYER_ID aLayer ) { // Set display settings for high contrast mode KIGFX::RENDER_SETTINGS* rSettings = m_view->GetPainter()->GetSettings(); SetTopLayer( aLayer ); rSettings->ClearActiveLayers(); rSettings->SetActiveLayer( aLayer ); m_view->UpdateAllLayersColor(); }
void PCB_DRAW_PANEL_GAL::SetHighContrastLayer( LAYER_ID aLayer ) { // Set display settings for high contrast mode KIGFX::RENDER_SETTINGS* rSettings = m_view->GetPainter()->GetSettings(); SetTopLayer( aLayer ); rSettings->ClearActiveLayers(); rSettings->SetActiveLayer( aLayer ); if( IsCopperLayer( aLayer ) ) { // Bring some other layers to the front in case of copper layers and make them colored // fixme do not like the idea of storing the list of layers here, // should be done in some other way I guess.. LAYER_NUM layers[] = { GetNetnameLayer( aLayer ), ITEM_GAL_LAYER( VIA_THROUGH_VISIBLE ), ITEM_GAL_LAYER( VIAS_HOLES_VISIBLE ), ITEM_GAL_LAYER( PADS_VISIBLE ), ITEM_GAL_LAYER( PADS_HOLES_VISIBLE ), NETNAMES_GAL_LAYER( PADS_NETNAMES_VISIBLE ), ITEM_GAL_LAYER( GP_OVERLAY ), ITEM_GAL_LAYER( RATSNEST_VISIBLE ) }; for( unsigned int i = 0; i < sizeof( layers ) / sizeof( LAYER_NUM ); ++i ) rSettings->SetActiveLayer( layers[i] ); // Pads should be shown too if( aLayer == B_Cu ) { rSettings->SetActiveLayer( ITEM_GAL_LAYER( PAD_BK_VISIBLE ) ); rSettings->SetActiveLayer( ITEM_GAL_LAYER( MOD_BK_VISIBLE ) ); rSettings->SetActiveLayer( NETNAMES_GAL_LAYER( PAD_BK_NETNAMES_VISIBLE ) ); } else if( aLayer == F_Cu ) { rSettings->SetActiveLayer( ITEM_GAL_LAYER( PAD_FR_VISIBLE ) ); rSettings->SetActiveLayer( ITEM_GAL_LAYER( MOD_FR_VISIBLE ) ); rSettings->SetActiveLayer( NETNAMES_GAL_LAYER( PAD_FR_NETNAMES_VISIBLE ) ); } } m_view->UpdateAllLayersColor(); }