本文整理汇总了C++中LIB_ITEM::SetEraseLastDrawItem方法的典型用法代码示例。如果您正苦于以下问题:C++ LIB_ITEM::SetEraseLastDrawItem方法的具体用法?C++ LIB_ITEM::SetEraseLastDrawItem怎么用?C++ LIB_ITEM::SetEraseLastDrawItem使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类LIB_ITEM
的用法示例。
在下文中一共展示了LIB_ITEM::SetEraseLastDrawItem方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: RedrawWhileMovingCursor
/*
* Redraw the graphic shape while moving
*/
static void RedrawWhileMovingCursor( EDA_DRAW_PANEL* aPanel, wxDC* aDC, const wxPoint& aPosition,
bool aErase )
{
LIB_ITEM* item;
item = ( (LIB_EDIT_FRAME*) aPanel->GetParent() )->GetDrawItem();
if( item == NULL )
return;
item->SetEraseLastDrawItem( aErase );
// if item is the reference field, we must add the current unit id
if( item->Type() == LIB_FIELD_T )
{
int unit = ((LIB_EDIT_FRAME*)aPanel->GetParent())->GetUnit();
wxString text = ((LIB_FIELD*)item)->GetFullText( unit );
item->Draw( aPanel, aDC, aPanel->GetParent()->GetCrossHairPosition( true ),
COLOR4D::UNSPECIFIED, g_XorMode, &text,
DefaultTransform );
}
else
item->Draw( aPanel, aDC, aPanel->GetParent()->GetCrossHairPosition( true ),
COLOR4D::UNSPECIFIED, g_XorMode, NULL,
DefaultTransform );
}
示例2: SymbolDisplayDraw
//! @brief Manage mouse events when creating new graphic object or modifying an graphic object.
static void SymbolDisplayDraw( EDA_DRAW_PANEL* aPanel, wxDC* aDC, const wxPoint& aPosition,
bool aErase )
{
LIB_ITEM* item = ( (LIB_EDIT_FRAME*) aPanel->GetParent() )->GetDrawItem();
if( item == NULL )
return;
item->SetEraseLastDrawItem( aErase );
item->Draw( aPanel, aDC, aPanel->GetParent()->GetCrossHairPosition( true ),
COLOR4D::UNSPECIFIED, g_XorMode, NULL, DefaultTransform );
}