本文整理汇总了C++中ZONE_CONTAINER::ClearFilledPolysList方法的典型用法代码示例。如果您正苦于以下问题:C++ ZONE_CONTAINER::ClearFilledPolysList方法的具体用法?C++ ZONE_CONTAINER::ClearFilledPolysList怎么用?C++ ZONE_CONTAINER::ClearFilledPolysList使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ZONE_CONTAINER
的用法示例。
在下文中一共展示了ZONE_CONTAINER::ClearFilledPolysList方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: ZoneUnfillAll
int PCB_EDITOR_CONTROL::ZoneUnfillAll( const TOOL_EVENT& aEvent )
{
BOARD* board = getModel<BOARD>();
RN_DATA* ratsnest = board->GetRatsnest();
BOARD_COMMIT commit( this );
for( int i = 0; i < board->GetAreaCount(); ++i )
{
ZONE_CONTAINER* zone = board->GetArea( i );
commit.Modify( zone );
zone->SetIsFilled( false );
zone->ClearFilledPolysList();
ratsnest->Update( zone );
getView()->Update( zone );
}
commit.Push( _( "Unfill All Zones" ) );
ratsnest->Recalculate();
return 0;
}
示例2: ZoneUnfill
int PCB_EDITOR_CONTROL::ZoneUnfill( const TOOL_EVENT& aEvent )
{
auto selTool = m_toolMgr->GetTool<SELECTION_TOOL>();
const auto& selection = selTool->GetSelection();
RN_DATA* ratsnest = getModel<BOARD>()->GetRatsnest();
BOARD_COMMIT commit( this );
for( auto item : selection )
{
assert( item->Type() == PCB_ZONE_AREA_T );
ZONE_CONTAINER* zone = static_cast<ZONE_CONTAINER*>( item );
commit.Modify( zone );
zone->SetIsFilled( false );
zone->ClearFilledPolysList();
ratsnest->Update( zone );
getView()->Update( zone );
}
commit.Push( _( "Unfill Zone" ) );
ratsnest->Recalculate();
return 0;
}
示例3: ZoneUnfillAll
int PCB_EDITOR_CONTROL::ZoneUnfillAll( const TOOL_EVENT& aEvent )
{
BOARD* board = getModel<BOARD>();
for( int i = 0; i < board->GetAreaCount(); ++i )
{
ZONE_CONTAINER* zone = board->GetArea( i );
zone->SetIsFilled( false );
zone->ClearFilledPolysList();
zone->ViewUpdate();
}
setTransitions();
return 0;
}
示例4: ZoneUnfillAll
int PCB_EDITOR_CONTROL::ZoneUnfillAll( const TOOL_EVENT& aEvent )
{
BOARD* board = getModel<BOARD>();
RN_DATA* ratsnest = board->GetRatsnest();
for( int i = 0; i < board->GetAreaCount(); ++i )
{
ZONE_CONTAINER* zone = board->GetArea( i );
zone->SetIsFilled( false );
zone->ClearFilledPolysList();
ratsnest->Update( zone );
zone->ViewUpdate();
}
ratsnest->Recalculate();
return 0;
}
示例5: ZoneUnfill
int PCB_EDITOR_CONTROL::ZoneUnfill( TOOL_EVENT& aEvent )
{
SELECTION_TOOL* selTool = m_toolMgr->GetTool<SELECTION_TOOL>();
const SELECTION& selection = selTool->GetSelection();
for( int i = 0; i < selection.Size(); ++i )
{
assert( selection.Item<BOARD_ITEM>( i )->Type() == PCB_ZONE_AREA_T );
ZONE_CONTAINER* zone = selection.Item<ZONE_CONTAINER>( i );
zone->SetIsFilled( false );
zone->ClearFilledPolysList();
zone->ViewUpdate();
}
setTransitions();
return 0;
}
示例6: ZoneUnfill
int PCB_EDITOR_CONTROL::ZoneUnfill( const TOOL_EVENT& aEvent )
{
SELECTION_TOOL* selTool = m_toolMgr->GetTool<SELECTION_TOOL>();
const SELECTION& selection = selTool->GetSelection();
RN_DATA* ratsnest = getModel<BOARD>()->GetRatsnest();
for( int i = 0; i < selection.Size(); ++i )
{
assert( selection.Item<BOARD_ITEM>( i )->Type() == PCB_ZONE_AREA_T );
ZONE_CONTAINER* zone = selection.Item<ZONE_CONTAINER>( i );
zone->SetIsFilled( false );
zone->ClearFilledPolysList();
ratsnest->Update( zone );
zone->ViewUpdate();
}
ratsnest->Recalculate();
return 0;
}
示例7: updateItem
void POINT_EDITOR::updateItem() const
{
EDA_ITEM* item = m_editPoints->GetParent();
switch( item->Type() )
{
case PCB_LINE_T:
case PCB_MODULE_EDGE_T:
{
DRAWSEGMENT* segment = static_cast<DRAWSEGMENT*>( item );
switch( segment->GetShape() )
{
case S_SEGMENT:
if( isModified( m_editPoints->Point( SEG_START ) ) )
segment->SetStart( wxPoint( m_editPoints->Point( SEG_START ).GetPosition().x,
m_editPoints->Point( SEG_START ).GetPosition().y ) );
else if( isModified( m_editPoints->Point( SEG_END ) ) )
segment->SetEnd( wxPoint( m_editPoints->Point( SEG_END ).GetPosition().x,
m_editPoints->Point( SEG_END ).GetPosition().y ) );
break;
case S_ARC:
{
const VECTOR2I& center = m_editPoints->Point( ARC_CENTER ).GetPosition();
const VECTOR2I& start = m_editPoints->Point( ARC_START ).GetPosition();
const VECTOR2I& end = m_editPoints->Point( ARC_END ).GetPosition();
if( center != segment->GetCenter() )
{
wxPoint moveVector = wxPoint( center.x, center.y ) - segment->GetCenter();
segment->Move( moveVector );
m_editPoints->Point( ARC_START ).SetPosition( segment->GetArcStart() );
m_editPoints->Point( ARC_END ).SetPosition( segment->GetArcEnd() );
}
else
{
segment->SetArcStart( wxPoint( start.x, start.y ) );
VECTOR2D startLine = start - center;
VECTOR2I endLine = end - center;
double newAngle = RAD2DECIDEG( endLine.Angle() - startLine.Angle() );
// Adjust the new angle to (counter)clockwise setting
bool clockwise = ( segment->GetAngle() > 0 );
if( clockwise && newAngle < 0.0 )
newAngle += 3600.0;
else if( !clockwise && newAngle > 0.0 )
newAngle -= 3600.0;
segment->SetAngle( newAngle );
}
break;
}
case S_CIRCLE:
{
const VECTOR2I& center = m_editPoints->Point( CIRC_CENTER ).GetPosition();
const VECTOR2I& end = m_editPoints->Point( CIRC_END ).GetPosition();
if( isModified( m_editPoints->Point( CIRC_CENTER ) ) )
{
wxPoint moveVector = wxPoint( center.x, center.y ) - segment->GetCenter();
segment->Move( moveVector );
}
else
{
segment->SetEnd( wxPoint( end.x, end.y ) );
}
break;
}
default: // suppress warnings
break;
}
// Update relative coordinates for module edges
if( EDGE_MODULE* edge = dyn_cast<EDGE_MODULE*>( item ) )
edge->SetLocalCoord();
break;
}
case PCB_ZONE_AREA_T:
{
ZONE_CONTAINER* zone = static_cast<ZONE_CONTAINER*>( item );
zone->ClearFilledPolysList();
CPolyLine* outline = zone->Outline();
for( int i = 0; i < outline->GetCornersCount(); ++i )
{
VECTOR2I point = m_editPoints->Point( i ).GetPosition();
outline->SetX( i, point.x );
outline->SetY( i, point.y );
//.........这里部分代码省略.........