本文整理汇总了C++中EDA_DRAW_PANEL_GAL::ForceRefresh方法的典型用法代码示例。如果您正苦于以下问题:C++ EDA_DRAW_PANEL_GAL::ForceRefresh方法的具体用法?C++ EDA_DRAW_PANEL_GAL::ForceRefresh怎么用?C++ EDA_DRAW_PANEL_GAL::ForceRefresh使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类EDA_DRAW_PANEL_GAL
的用法示例。
在下文中一共展示了EDA_DRAW_PANEL_GAL::ForceRefresh方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: OnRenderColorChange
void PCB_LAYER_WIDGET::OnRenderColorChange( int aId, COLOR4D aColor )
{
wxASSERT( aId > GAL_LAYER_ID_START && aId < GAL_LAYER_ID_END );
myframe->Settings().Colors().SetItemColor( static_cast<GAL_LAYER_ID>( aId ), aColor );
EDA_DRAW_PANEL_GAL* galCanvas = myframe->GetGalCanvas();
if( galCanvas && myframe->IsGalCanvasActive() )
{
if( aId == LAYER_GRID )
galCanvas->GetGAL()->SetGridColor( aColor );
KIGFX::VIEW* view = galCanvas->GetView();
view->GetPainter()->GetSettings()->ImportLegacyColors( &myframe->Settings().Colors() );
view->MarkTargetDirty( KIGFX::TARGET_NONCACHED ); // useful to update rastnest
view->UpdateLayerColor( aId );
// plated-through-holes don't have their own color; they use the background color
if( aId == LAYER_PCB_BACKGROUND )
view->UpdateLayerColor( LAYER_PADS_PLATEDHOLES );
galCanvas->ForceRefresh();
}
myframe->ReCreateHToolbar();
myframe->GetCanvas()->Refresh();
}