本文整理汇总了C++中TEXTE_MODULE::GetBoundingBox方法的典型用法代码示例。如果您正苦于以下问题:C++ TEXTE_MODULE::GetBoundingBox方法的具体用法?C++ TEXTE_MODULE::GetBoundingBox怎么用?C++ TEXTE_MODULE::GetBoundingBox使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TEXTE_MODULE
的用法示例。
在下文中一共展示了TEXTE_MODULE::GetBoundingBox方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: 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 );
}