本文整理汇总了C++中TEXTE_MODULE::DrawUmbilical方法的典型用法代码示例。如果您正苦于以下问题:C++ TEXTE_MODULE::DrawUmbilical方法的具体用法?C++ TEXTE_MODULE::DrawUmbilical怎么用?C++ TEXTE_MODULE::DrawUmbilical使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TEXTE_MODULE
的用法示例。
在下文中一共展示了TEXTE_MODULE::DrawUmbilical方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: Show_MoveTexte_Module
static void Show_MoveTexte_Module( EDA_DRAW_PANEL* aPanel, wxDC* aDC, const wxPoint& aPosition,
bool aErase )
{
BASE_SCREEN* screen = aPanel->GetScreen();
TEXTE_MODULE* Text = static_cast<TEXTE_MODULE*>( screen->GetCurItem() );
if( Text == NULL )
return;
// Erase umbilical and text if necessary
if( aErase )
{
Text->DrawUmbilical( aPanel, aDC, GR_XOR, -MoveVector );
Text->Draw( aPanel, aDC, GR_XOR, MoveVector );
}
MoveVector = TextInitialPosition - aPanel->GetParent()->GetCrossHairPosition();
// Draw umbilical if text moved
if( MoveVector.x || MoveVector.y )
Text->DrawUmbilical( aPanel, aDC, GR_XOR, -MoveVector );
// Redraw text
Text->Draw( aPanel, aDC, GR_XOR, MoveVector );
}
示例2: AbortMoveTextModule
/**
* Abort text move in progress.
*
* If a text is selected, its initial coordinates are regenerated.
*/
static void AbortMoveTextModule( EDA_DRAW_PANEL* Panel, wxDC* DC )
{
BASE_SCREEN* screen = Panel->GetScreen();
TEXTE_MODULE* Text = static_cast<TEXTE_MODULE*>( screen->GetCurItem() );
MODULE* Module;
Panel->SetMouseCapture( NULL, NULL );
if( Text == NULL )
return;
Module = static_cast<MODULE*>( Text->GetParent() );
Text->DrawUmbilical( Panel, DC, GR_XOR, -MoveVector );
Text->Draw( Panel, DC, GR_XOR, MoveVector );
// If the text was moved (the move does not change internal data)
// it could be rotated while moving. So set old value for orientation
if( Text->IsMoving() )
Text->SetTextAngle( TextInitialOrientation );
// Redraw the text
Panel->RefreshDrawingRect( Text->GetBoundingBox() );
// leave it at (0,0) so we can use it Rotate when not moving.
MoveVector.x = MoveVector.y = 0;
Text->ClearFlags();
Module->ClearFlags();
screen->SetCurItem( NULL );
}