MGUI::TOOL_INSERTION Class Reference

Insertion tool class. More...

#include <mgui/toolinsertion.h>

Inheritance diagram for MGUI::TOOL_INSERTION:
Inheritance graph
[legend]

List of all members.

Public Member Functions

 TOOL_INSERTION (TOOLCANVAS *canvas)
virtual ~TOOL_INSERTION ()
double GetAngle () const
const DRECT2DGetExtents () const
const DPOINT2DGetInsertionPoint () const
const DPOINT2DGetScale () const
const TRANS2D_AFFINEGetTransformation () const
void SetAngle (double angle)
void SetAngleVisible (bool anglevisible=true)
void SetCenterVisible (bool centervisible=true)
void SetInsertionPoint (const DPOINT2D &InsertionPoint)
void SetScale (const DPOINT2D &scale)
void SetSideMarkerLength (int lengthoutside)
void SetSourcePosition (const DRECT2D &SrcExtents, const DPOINT2D *SrcBasePoint=0, bool ResetToIdentity=true)

Detailed Description

Insertion tool class.


Constructor & Destructor Documentation

MGUI::TOOL_INSERTION::TOOL_INSERTION ( TOOLCANVAS canvas  )  [explicit]

Constructor.

virtual MGUI::TOOL_INSERTION::~TOOL_INSERTION (  )  [virtual]

Destructor.


Member Function Documentation

double MGUI::TOOL_INSERTION::GetAngle (  )  const [inline]

Get rotation angle.

Returns:
Rotation angle in RADIANS.
const DRECT2D& MGUI::TOOL_INSERTION::GetExtents (  )  const [inline]

Get extents from the current transformation to the destination based on the current tool settings.

const DPOINT2D& MGUI::TOOL_INSERTION::GetInsertionPoint (  )  const [inline]

Get the insertion point for the transformation The Insertion Point, combined with the source Base Point, Scale factors and Rotation, determine the affine transformation.

const DPOINT2D& MGUI::TOOL_INSERTION::GetScale (  )  const [inline]

Get current scale factors.

Returns:
Current X and Y scale factors
const TRANS2D_AFFINE& MGUI::TOOL_INSERTION::GetTransformation (  )  const [inline]

Get the affine transformation from source to destination based on the current tool settings.

Returns:
The current affine transformation from source to destination coordinates.
void MGUI::TOOL_INSERTION::SetAngle ( double  angle  ) 

Set rotation angle.

void MGUI::TOOL_INSERTION::SetAngleVisible ( bool  anglevisible = true  ) 

Set whether rotation angle indicator is visible.

The rotation angle is indicated by a line from the center to the boundary. Only valid if the source base point is in the center of the box.

void MGUI::TOOL_INSERTION::SetCenterVisible ( bool  centervisible = true  ) 

Set whether center marker is visible.

void MGUI::TOOL_INSERTION::SetInsertionPoint ( const DPOINT2D InsertionPoint  ) 

Set the insertion point for the transformation The Insertion Point, combined with the source Base Point, Scale factors and Rotation, determine the affine transformation.

void MGUI::TOOL_INSERTION::SetScale ( const DPOINT2D scale  ) 

Set current X and Y scale factors The Scale factors, combined with the source Base Point, Insertion Point and Rotation, determine the affine transformation.

void MGUI::TOOL_INSERTION::SetSideMarkerLength ( int  lengthoutside  ) 

Set length of "side markers".

By default, no side markers are shown. This is useful if box indicates a target if it can become small and hard to see.

Parameters:
lengthoutside Length of marker outside box in pixels
void MGUI::TOOL_INSERTION::SetSourcePosition ( const DRECT2D SrcExtents,
const DPOINT2D SrcBasePoint = 0,
bool  ResetToIdentity = true 
)

Set the 'source' position.

Parameters:
SrcExtents Extents of the source in tool coordinates
SrcBasePoint If not specified, the base point will be the the center point of the source extents
ResetToIdentity If 'true', the transformation parameters will be reset to an identity transformation.

The documentation for this class was generated from the following file:

Generated on Sun Oct 7 21:36:18 2012 for TNTsdk 2012 by  doxygen 1.6.1