casa  $Rev:20696$
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes
casa::DDDPolygon Class Reference

Implementation of aan ellipse object for DrawingDisplayData class. More...

#include <DDDPolygon.h>

Inheritance diagram for casa::DDDPolygon:
casa::DDDObject casa::WCRefreshEH casa::WCMotionEH casa::WCPositionEH casa::DisplayEH

List of all members.

Public Member Functions

 DDDPolygon (const Record &description, DrawingDisplayData *owner)
 Constructor taking a Record description.
virtual ~DDDPolygon ()
 Destructor.
virtual void draw (const Display::RefreshReason &reason, WorldCanvas *worldcanvas)
 Draw this rectangle object for the given reason on the provided WorldCanvas.
virtual Record description ()
 Return a record describing this object.
virtual void setDescription (const Record &rec)
 Update this object based on the information in the provided Record.
virtual void operator() (const WCRefreshEvent &)
 Event handlers.
virtual void operator() (const WCPositionEvent &ev)
 Default just prints the event to cout.
virtual void operator() (const WCMotionEvent &ev)
 default sends event to cout

Protected Member Functions

 DDDPolygon ()
 
    

 DDDPolygon (const DDDPolygon &other)
 (Required) copy constructor.
void operator= (const DDDPolygon &other)
 (Required) copy assignment.

Private Member Functions

void convertToPixel ()
 COnvert parameters from world to pixel.
void updateWorldValues ()
 Update private world parameters from current pixel values.
void decode (const RecordInterface &description, Bool required)
 Decode record into private data.
void encode (RecordInterface &description) const
 Encode private data into record.
void createCorners ()
 compute corners of rectangle of bounding box of polygon
void createHandles ()
 create handles, one per vertex
void listWorld ()
 Debugging routines.
void listPixel ()

Private Attributes

Bool itsOutline
 Fill style.
Quantum< Vector< Double > > itsWorldX
 Define x and y.
Quantum< Vector< Double > > itsWorldY
Vector< DoubleitsPixelX
Vector< DoubleitsPixelY
uInt itsNPoints
Matrix< DoubleitsCorners
 Rotated Rectangle Corners to draw in screen pixel.
Block< DDDHandleitsHandles
 List of handles.
DDDObject::Mode itsMode
 Mode.
Double itsBaseMoveX
 Store for movement bases.
Double itsBaseMoveY
Bool itsRecompute
 In function draw(), recompute all pixel coordinates when true else use what is currently set.
LogIO itsLogger
 LOgger.
CoordinateSystem itsCoordinateSystem
 CoordinateSystem in screen pixel coordinates.
WorldCanvasitsWorldCanvasPtr
 pointer to world canvas (shallow copy)
Bool itsFracX
 Fractional indicators.
Bool itsFracY

Detailed Description

Implementation of aan ellipse object for DrawingDisplayData class.

Synopsis

This class implements the interface defined by DDDObject, to provide a polygon object for registration with DrawingDisplayData objects.

Definition at line 62 of file DDDPolygon.h.


Constructor & Destructor Documentation

casa::DDDPolygon::DDDPolygon ( const Record description,
DrawingDisplayData owner 
)

Constructor taking a Record description.

Fields in the record, on top of what is consumed by the DDDObject constructor, are: Required : x (quantum of vector double) and y (quantum of vector double). Other, not required fields are outline & editable which default to True. When editable=False the object can be moved but not reshaped, when True it can be moved and reshaped. When outline=False the ellipse is filled.

virtual casa::DDDPolygon::~DDDPolygon ( ) [virtual]

Destructor.

    

(Required) default constructor.

casa::DDDPolygon::DDDPolygon ( const DDDPolygon other) [protected]

(Required) copy constructor.


Member Function Documentation

COnvert parameters from world to pixel.

void casa::DDDPolygon::createCorners ( ) [private]

compute corners of rectangle of bounding box of polygon

void casa::DDDPolygon::createHandles ( ) [private]

create handles, one per vertex

void casa::DDDPolygon::decode ( const RecordInterface description,
Bool  required 
) [private]

Decode record into private data.

virtual Record casa::DDDPolygon::description ( ) [virtual]

Return a record describing this object.

Presently returns only construction description.

Reimplemented from casa::DDDObject.

virtual void casa::DDDPolygon::draw ( const Display::RefreshReason reason,
WorldCanvas worldcanvas 
) [virtual]

Draw this rectangle object for the given reason on the provided WorldCanvas.

Implements casa::DDDObject.

void casa::DDDPolygon::encode ( RecordInterface description) const [private]

Encode private data into record.

void casa::DDDPolygon::listPixel ( ) [private]
void casa::DDDPolygon::listWorld ( ) [private]

Debugging routines.

virtual void casa::DDDPolygon::operator() ( const WCRefreshEvent ) [inline, virtual]

Event handlers.

The parent DrawingDisplayData will distribute events as necessary to the various DDDObjects which comprise it.

Implements casa::DDDObject.

Definition at line 96 of file DDDPolygon.h.

virtual void casa::DDDPolygon::operator() ( const WCPositionEvent ev) [virtual]

Default just prints the event to cout.

Implements casa::DDDObject.

virtual void casa::DDDPolygon::operator() ( const WCMotionEvent ev) [virtual]

default sends event to cout

Implements casa::DDDObject.

void casa::DDDPolygon::operator= ( const DDDPolygon other) [protected]

(Required) copy assignment.

virtual void casa::DDDPolygon::setDescription ( const Record rec) [virtual]

Update this object based on the information in the provided Record.

Reimplemented from casa::DDDObject.

Update private world parameters from current pixel values.


Member Data Documentation

Store for movement bases.

Definition at line 138 of file DDDPolygon.h.

Definition at line 138 of file DDDPolygon.h.

CoordinateSystem in screen pixel coordinates.

Definition at line 150 of file DDDPolygon.h.

Rotated Rectangle Corners to draw in screen pixel.

Definition at line 126 of file DDDPolygon.h.

Fractional indicators.

Definition at line 156 of file DDDPolygon.h.

Definition at line 156 of file DDDPolygon.h.

List of handles.

Definition at line 130 of file DDDPolygon.h.

LOgger.

Definition at line 147 of file DDDPolygon.h.

Mode.

Definition at line 134 of file DDDPolygon.h.

Definition at line 123 of file DDDPolygon.h.

Fill style.

Definition at line 118 of file DDDPolygon.h.

Definition at line 122 of file DDDPolygon.h.

Definition at line 122 of file DDDPolygon.h.

In function draw(), recompute all pixel coordinates when true else use what is currently set.

Definition at line 143 of file DDDPolygon.h.

pointer to world canvas (shallow copy)

Definition at line 153 of file DDDPolygon.h.

Define x and y.

Definition at line 121 of file DDDPolygon.h.

Definition at line 121 of file DDDPolygon.h.


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