MicroImages::GRTOOL_REGPOLYGON Class Reference

GRTOOL_REGPOLYGON - "Regular Polygon" tool. More...

#include <mi32/grtool.h>

Inheritance diagram for MicroImages::GRTOOL_REGPOLYGON:

Inheritance graph
[legend]
List of all members.

Public Member Functions

virtual int GenerateRegion (REGION2D &region) const
double GetAngle () const
const DPOINT2DGetCenter () const
int GetNumSegments () const
double GetRadius () const
 GRTOOL_REGPOLYGON (GRTOOLVIEW *view)
void SetAngle (double newangle)
void SetAngleVisible (bool anglevisible=true)
void SetCenter (const DPOINT2D &center)
void SetMarker (MARKER marker, UINT16 size=0)
void SetNumSegments (int NumSegments)
void SetRadius (double radius)
void SetRadiusRange (double minradius, double maxradius)
virtual ~GRTOOL_REGPOLYGON ()

Private Types

enum  ZONE {
  ZONE_NoFunction = 0, ZONE_Outside, ZONE_Inside, ZONE_Perimeter,
  ZONE_SetCenter, ZONE_Rotate
}

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 bool OnKey (UINT nChar, UINT nRepCnt, UINT nFlags)
virtual void OnLButtonDown (UINT nFlags, const CPoint &mpoint)
virtual void OnMouseMove (UINT nFlags, const CPoint &mpoint)
void StartTool (const DPOINT2D &)
void UpdateCursor (const DPOINT2D &) const

Private Attributes

double m_angle
bool m_anglevisible
DPOINT2D m_center
ZONE m_CursorZone
MARKER m_marker
UINT16 m_markersize
double m_maxradius
double m_minradius
int m_NumSegments
DPOINT2D m_prevpt
double m_radius

Detailed Description

GRTOOL_REGPOLYGON - "Regular Polygon" tool.

Definition at line 1427 of file grtool.h.


Member Enumeration Documentation

enum MicroImages::GRTOOL_REGPOLYGON::ZONE [private]
 

Enumeration constants.

Enumeration values:
ZONE_NoFunction 
ZONE_Outside 
ZONE_Inside 
ZONE_Perimeter 
ZONE_SetCenter 
ZONE_Rotate 

Definition at line 1500 of file grtool.h.


Constructor & Destructor Documentation

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

Constructor.

virtual MicroImages::GRTOOL_REGPOLYGON::~GRTOOL_REGPOLYGON  )  [virtual]
 

Destructor.


Member Function Documentation

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

Methods.

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

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

Methods called by the GRTOOL base class.

Implements MicroImages::GRTOOL.

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

Reimplemented from MicroImages::GRTOOL.

virtual int MicroImages::GRTOOL_REGPOLYGON::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_REGPOLYGON::GetAngle  )  const [inline]
 

Get current rotation angle.

Definition at line 1445 of file grtool.h.

const DPOINT2D& MicroImages::GRTOOL_REGPOLYGON::GetCenter  )  const [inline]
 

Get center position.

Definition at line 1449 of file grtool.h.

int MicroImages::GRTOOL_REGPOLYGON::GetNumSegments  )  const [inline]
 

Get number of segments.

Definition at line 1453 of file grtool.h.

double MicroImages::GRTOOL_REGPOLYGON::GetRadius  )  const [inline]
 

Get radius.

Definition at line 1457 of file grtool.h.

virtual bool MicroImages::GRTOOL_REGPOLYGON::OnKey UINT  nChar,
UINT  nRepCnt,
UINT  nFlags
[private, virtual]
 

Methods called directly by the equivalent GRTOOLVIEW method.

Reimplemented from MicroImages::GRTOOL.

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

Implements MicroImages::GRTOOL.

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

Implements MicroImages::GRTOOL.

void MicroImages::GRTOOL_REGPOLYGON::SetAngle double  newangle  ) 
 

Set rotation angle.

void MicroImages::GRTOOL_REGPOLYGON::SetAngleVisible bool  anglevisible = true  ) 
 

Set whether angle indicator is visible.

void MicroImages::GRTOOL_REGPOLYGON::SetCenter const DPOINT2D center  ) 
 

Set center of polygon.

Parameters:
center  New center in tool coordinates

void MicroImages::GRTOOL_REGPOLYGON::SetMarker MARKER  marker,
UINT16  size = 0
 

Set marker type and size.

The default marker is MARKER_Plus with a size of 9 pixels.

Parameters:
marker  New marker type
size  New marker size, 0 to retain current size

void MicroImages::GRTOOL_REGPOLYGON::SetNumSegments int  NumSegments  ) 
 

Set number of polygon segments.

Parameters:
NumSegments  Number of segments >= 3

void MicroImages::GRTOOL_REGPOLYGON::SetRadius double  radius  ) 
 

Set polygon radius (distance from center to vertex).

Parameters:
radius  Radius is tool units

void MicroImages::GRTOOL_REGPOLYGON::SetRadiusRange double  minradius,
double  maxradius
 

Set allowed radius range.

Parameters:
minradius  Minimum radius
maxradius  Maximum radius, <= 0 for no maximum

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

void MicroImages::GRTOOL_REGPOLYGON::UpdateCursor const DPOINT2D  )  const [private]
 


Member Data Documentation

double MicroImages::GRTOOL_REGPOLYGON::m_angle [private]
 

Definition at line 1517 of file grtool.h.

bool MicroImages::GRTOOL_REGPOLYGON::m_anglevisible [private]
 

Visibility of rotation angle indicator.

Definition at line 1513 of file grtool.h.

DPOINT2D MicroImages::GRTOOL_REGPOLYGON::m_center [private]
 

Center.

Definition at line 1515 of file grtool.h.

ZONE MicroImages::GRTOOL_REGPOLYGON::m_CursorZone [private]
 

Current cursor zone.

Definition at line 1520 of file grtool.h.

MARKER MicroImages::GRTOOL_REGPOLYGON::m_marker [private]
 

Tool settings.

Definition at line 1509 of file grtool.h.

UINT16 MicroImages::GRTOOL_REGPOLYGON::m_markersize [private]
 

Definition at line 1510 of file grtool.h.

double MicroImages::GRTOOL_REGPOLYGON::m_maxradius [private]
 

Maximum radius, 0 if no maximum.

Definition at line 1512 of file grtool.h.

double MicroImages::GRTOOL_REGPOLYGON::m_minradius [private]
 

Minimum radius.

Definition at line 1511 of file grtool.h.

int MicroImages::GRTOOL_REGPOLYGON::m_NumSegments [private]
 

Definition at line 1518 of file grtool.h.

DPOINT2D MicroImages::GRTOOL_REGPOLYGON::m_prevpt [private]
 

Previous point during button-down.

Definition at line 1521 of file grtool.h.

double MicroImages::GRTOOL_REGPOLYGON::m_radius [private]
 

Distance from center to each vertex.

Definition at line 1516 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