MGUI::TOOL_RECTANGLE Class Reference

Rectangle tool class. More...

#include <mgui/toolrect.h>

Inheritance diagram for MGUI::TOOL_RECTANGLE:

Inheritance graph
[legend]
List of all members.

Public Member Functions

double GetAngle () const
DPOINT2D GetCenter () const
const DPOINT2DGetCorner (int corner) const
void GetCorners (DPOINT2D rcorners[4]) const
const DPOINT2DGetCorners () const
const DRECT2DGetExtents () const
const DPOINT2DGetSize () const
TOOL_RECTANGLEoperator= (const DRECT2D &rhs)
void SetAspect (double aspect)
 TOOL_RECTANGLE (TOOLCANVAS *canvas)
virtual ~TOOL_RECTANGLE ()

Detailed Description

Rectangle tool class.

Definition at line 32 of file toolrect.h.


Constructor & Destructor Documentation

MGUI::TOOL_RECTANGLE::TOOL_RECTANGLE TOOLCANVAS canvas  )  [explicit]
 

Constructor.

virtual MGUI::TOOL_RECTANGLE::~TOOL_RECTANGLE  )  [virtual]
 

Destructor.


Member Function Documentation

double MGUI::TOOL_RECTANGLE::GetAngle  )  const [inline]
 

Get rotation angle.

Returns:
Rotation angle in RADIANS.

Definition at line 50 of file toolrect.h.

DPOINT2D MGUI::TOOL_RECTANGLE::GetCenter  )  const [inline]
 

Get center of rectangle in tool coordinates.

Definition at line 54 of file toolrect.h.

const DPOINT2D& MGUI::TOOL_RECTANGLE::GetCorner int  corner  )  const [inline]
 

Get coordinates of specified corner.

Parameters:
corner  Corner number (0-3)

Definition at line 58 of file toolrect.h.

void MGUI::TOOL_RECTANGLE::GetCorners DPOINT2D  rcorners[4]  )  const [inline]
 

Copy corner coordinates into specified array.

Parameters:
rcorners  Array to contain corner coordinates

Definition at line 68 of file toolrect.h.

const DPOINT2D* MGUI::TOOL_RECTANGLE::GetCorners  )  const [inline]
 

Get coordinates of all rectangle corners.

Returns:
Array of 4 corner coordinates.

Definition at line 64 of file toolrect.h.

const DRECT2D& MGUI::TOOL_RECTANGLE::GetExtents  )  const [inline]
 

Get extents of tool.

Definition at line 73 of file toolrect.h.

const DPOINT2D& MGUI::TOOL_RECTANGLE::GetSize  )  const [inline]
 

Get current rectangle size.

Returns:
Size in tool coordinates before rotation.

Definition at line 78 of file toolrect.h.

TOOL_RECTANGLE& MGUI::TOOL_RECTANGLE::operator= const DRECT2D rhs  ) 
 

Assigment from DRECT2D.

Parameters:
rhs  Rectangle in tool coordinates to assign from

void MGUI::TOOL_RECTANGLE::SetAspect double  aspect  ) 
 

Set aspect ratio for rectangle.

Setting the aspect ratio to a value <= 0 removes the aspect constraint.

Parameters:
aspect  Aspect ratio X/Y


The documentation for this class was generated from the following file:
Generated on Tue Dec 14 13:21:02 2004 for TNTsdk by  doxygen 1.3.8-20040913