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