本文整理汇总了C++中kigfx::VIEW::UpdateAllLayersColor方法的典型用法代码示例。如果您正苦于以下问题:C++ VIEW::UpdateAllLayersColor方法的具体用法?C++ VIEW::UpdateAllLayersColor怎么用?C++ VIEW::UpdateAllLayersColor使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类kigfx::VIEW
的用法示例。
在下文中一共展示了VIEW::UpdateAllLayersColor方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: setHighContrastLayer
void PCB_EDIT_FRAME::setHighContrastLayer( LAYER_NUM aLayer )
{
// Set display settings for high contrast mode
KIGFX::VIEW* view = GetGalCanvas()->GetView();
KIGFX::RENDER_SETTINGS* rSettings = 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( VIAS_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 == FIRST_COPPER_LAYER )
{
rSettings->SetActiveLayer( ITEM_GAL_LAYER( PAD_BK_VISIBLE ) );
rSettings->SetActiveLayer( NETNAMES_GAL_LAYER( PAD_BK_NETNAMES_VISIBLE ) );
}
else if( aLayer == LAST_COPPER_LAYER )
{
rSettings->SetActiveLayer( ITEM_GAL_LAYER( PAD_FR_VISIBLE ) );
rSettings->SetActiveLayer( NETNAMES_GAL_LAYER( PAD_FR_NETNAMES_VISIBLE ) );
}
}
view->UpdateAllLayersColor();
}