MicroImages::GRTOOL_RECTANGLE Class Reference

GRTOOL_RECTANGLE - Rectangle tool. More...

#include <mi32/grtool.h>

Inheritance diagram for MicroImages::GRTOOL_RECTANGLE:

Inheritance graph
[legend]
List of all members.

Public Member Functions

virtual int GenerateRegion (REGION2D &region) const
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
 GRTOOL_RECTANGLE (GRTOOLVIEW *view)
GRTOOL_RECTANGLEoperator= (const DRECT2D &rhs)
void SetAspect (double aspect)
virtual ~GRTOOL_RECTANGLE ()

Protected Member Functions

virtual void OnChangeLimits ()

Private Types

enum  ZONE {
  ZONE_Outside = 0, ZONE_Inside, ZONE_Corner0, ZONE_Corner1,
  ZONE_Corner2, ZONE_Corner3, ZONE_Side01, ZONE_Side12,
  ZONE_Side23, ZONE_Side30, ZONE_NoFunction
}

Private Member Functions

void AdjustTool (const DPOINT2D &, bool firsttime=false)
void ComputeCursorZone (const DPOINT2D &)
virtual void DoDraw (CDC *)
virtual void DoMove (double dx, double dy, ADJUSTFLAGS flags)
virtual void OnLButtonDown (UINT nFlags, const CPoint &mpoint)
virtual void OnMouseMove (UINT nFlags, const CPoint &mpoint)
void Recompute ()
void ResizeTool (const DPOINT2D &)
void RotateTool (const DPOINT2D &)
void StartTool (const DPOINT2D &)
void UpdateCursor () const

Private Attributes

UINT8 m_AdjustMode
double m_angle
double m_aspect
DPOINT2D m_corners [4]
ZONE m_CursorZone
DRECT2D m_extents
DPOINT2D m_prevpt
DPOINT2D m_size

Detailed Description

GRTOOL_RECTANGLE - Rectangle tool.

Definition at line 1311 of file grtool.h.


Member Enumeration Documentation

enum MicroImages::GRTOOL_RECTANGLE::ZONE [private]
 

Enumeration constants.

Enumeration values:
ZONE_Outside 
ZONE_Inside 
ZONE_Corner0 
ZONE_Corner1 
ZONE_Corner2 
ZONE_Corner3 
ZONE_Side01 
ZONE_Side12 
ZONE_Side23 
ZONE_Side30 
ZONE_NoFunction 

Definition at line 1381 of file grtool.h.


Constructor & Destructor Documentation

MicroImages::GRTOOL_RECTANGLE::GRTOOL_RECTANGLE GRTOOLVIEW view  )  [explicit]
 

Constructor.

virtual MicroImages::GRTOOL_RECTANGLE::~GRTOOL_RECTANGLE  )  [virtual]
 

Destructor.


Member Function Documentation

void MicroImages::GRTOOL_RECTANGLE::AdjustTool const DPOINT2D ,
bool  firsttime = false
[private]
 

Methods.

void MicroImages::GRTOOL_RECTANGLE::ComputeCursorZone const DPOINT2D  )  [private]
 

virtual void MicroImages::GRTOOL_RECTANGLE::DoDraw CDC *   )  [private, virtual]
 

Methods called by the GRTOOL base class.

Implements MicroImages::GRTOOL.

virtual void MicroImages::GRTOOL_RECTANGLE::DoMove double  dx,
double  dy,
ADJUSTFLAGS  flags
[private, virtual]
 

Reimplemented from MicroImages::GRTOOL.

virtual int MicroImages::GRTOOL_RECTANGLE::GenerateRegion REGION2D region  )  const [virtual]
 

Generate region from tool boundary.

Returns:
TRUE if region generated, FALSE if not, < 0 if error.

Reimplemented from MicroImages::GRTOOL.

double MicroImages::GRTOOL_RECTANGLE::GetAngle  )  const [inline]
 

Get rotation angle.

Returns:
Rotation angle in RADIANS.

Definition at line 1335 of file grtool.h.

DPOINT2D MicroImages::GRTOOL_RECTANGLE::GetCenter  )  const [inline]
 

Get center of rectangle in tool coordinates.

Definition at line 1339 of file grtool.h.

const DPOINT2D& MicroImages::GRTOOL_RECTANGLE::GetCorner int  corner  )  const [inline]
 

Get coordinates of specified corner.

Parameters:
corner  Corner number (0-3)

Definition at line 1343 of file grtool.h.

void MicroImages::GRTOOL_RECTANGLE::GetCorners DPOINT2D  rcorners[4]  )  const [inline]
 

Copy corner coordinates into specified array.

Parameters:
rcorners  Array to contain corner coordinates

Definition at line 1353 of file grtool.h.

const DPOINT2D* MicroImages::GRTOOL_RECTANGLE::GetCorners  )  const [inline]
 

Get coordinates of all rectangle corners.

Returns:
Array of 4 corner coordinates.

Definition at line 1349 of file grtool.h.

const DRECT2D& MicroImages::GRTOOL_RECTANGLE::GetExtents  )  const [inline]
 

Get extents of tool.

Definition at line 1358 of file grtool.h.

const DPOINT2D& MicroImages::GRTOOL_RECTANGLE::GetSize  )  const [inline]
 

Get current rectangle size.

Returns:
Size in tool coordinates before rotation.

Definition at line 1363 of file grtool.h.

virtual void MicroImages::GRTOOL_RECTANGLE::OnChangeLimits  )  [protected, virtual]
 

Called when limits are changed.

Derived class must call superclass method BEFORE performing own processing.

Reimplemented from MicroImages::GRTOOL_LIMITED.

virtual void MicroImages::GRTOOL_RECTANGLE::OnLButtonDown UINT  nFlags,
const CPoint &  mpoint
[private, virtual]
 

Methods called directly by the equivalent GRTOOLVIEW method.

Implements MicroImages::GRTOOL.

virtual void MicroImages::GRTOOL_RECTANGLE::OnMouseMove UINT  nFlags,
const CPoint &  mpoint
[private, virtual]
 

Implements MicroImages::GRTOOL.

GRTOOL_RECTANGLE& MicroImages::GRTOOL_RECTANGLE::operator= const DRECT2D rhs  ) 
 

Assigment from DRECT2D.

Parameters:
rhs  Rectangle in tool coordinates to assign from

void MicroImages::GRTOOL_RECTANGLE::Recompute  )  [private]
 

void MicroImages::GRTOOL_RECTANGLE::ResizeTool const DPOINT2D  )  [private]
 

void MicroImages::GRTOOL_RECTANGLE::RotateTool const DPOINT2D  )  [private]
 

void MicroImages::GRTOOL_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

void MicroImages::GRTOOL_RECTANGLE::StartTool const DPOINT2D  )  [private]
 

void MicroImages::GRTOOL_RECTANGLE::UpdateCursor  )  const [private]
 


Member Data Documentation

UINT8 MicroImages::GRTOOL_RECTANGLE::m_AdjustMode [private]
 

Adjustment mode, 2=rotate, 1=everything else.

Definition at line 1404 of file grtool.h.

double MicroImages::GRTOOL_RECTANGLE::m_angle [private]
 

Rotation angle.

Definition at line 1400 of file grtool.h.

double MicroImages::GRTOOL_RECTANGLE::m_aspect [private]
 

Aspect ratio, proportional if > 0.

Definition at line 1395 of file grtool.h.

DPOINT2D MicroImages::GRTOOL_RECTANGLE::m_corners[4] [private]
 

Corner coordinates.

Definition at line 1398 of file grtool.h.

ZONE MicroImages::GRTOOL_RECTANGLE::m_CursorZone [private]
 

Current cursor zone.

Definition at line 1402 of file grtool.h.

DRECT2D MicroImages::GRTOOL_RECTANGLE::m_extents [private]
 

Position (extents if rotated).

Definition at line 1397 of file grtool.h.

DPOINT2D MicroImages::GRTOOL_RECTANGLE::m_prevpt [private]
 

Previous point during button-down.

Definition at line 1403 of file grtool.h.

DPOINT2D MicroImages::GRTOOL_RECTANGLE::m_size [private]
 

Current size.

Definition at line 1399 of file grtool.h.


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