casa
$Rev:20696$
|
Implementation of aan ellipse object for DrawingDisplayData class. More...
#include <DDDPolygon.h>
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< Double > | itsPixelX |
Vector< Double > | itsPixelY |
uInt | itsNPoints |
Matrix< Double > | itsCorners |
Rotated Rectangle Corners to draw in screen pixel. | |
Block< DDDHandle > | itsHandles |
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. | |
WorldCanvas * | itsWorldCanvasPtr |
pointer to world canvas (shallow copy) | |
Bool | itsFracX |
Fractional indicators. | |
Bool | itsFracY |
Implementation of aan ellipse object for DrawingDisplayData class.
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.
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.
casa::DDDPolygon::DDDPolygon | ( | ) | [protected] |
(Required) default constructor.
casa::DDDPolygon::DDDPolygon | ( | const DDDPolygon & | other | ) | [protected] |
(Required) copy constructor.
void casa::DDDPolygon::convertToPixel | ( | ) | [private] |
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.
void casa::DDDPolygon::updateWorldValues | ( | ) | [private] |
Update private world parameters from current pixel values.
Double casa::DDDPolygon::itsBaseMoveX [private] |
Store for movement bases.
Definition at line 138 of file DDDPolygon.h.
Double casa::DDDPolygon::itsBaseMoveY [private] |
Definition at line 138 of file DDDPolygon.h.
CoordinateSystem in screen pixel coordinates.
Definition at line 150 of file DDDPolygon.h.
Matrix<Double> casa::DDDPolygon::itsCorners [private] |
Rotated Rectangle Corners to draw in screen pixel.
Definition at line 126 of file DDDPolygon.h.
Bool casa::DDDPolygon::itsFracX [private] |
Fractional indicators.
Definition at line 156 of file DDDPolygon.h.
Bool casa::DDDPolygon::itsFracY [private] |
Definition at line 156 of file DDDPolygon.h.
Block<DDDHandle> casa::DDDPolygon::itsHandles [private] |
List of handles.
Definition at line 130 of file DDDPolygon.h.
LogIO casa::DDDPolygon::itsLogger [private] |
LOgger.
Definition at line 147 of file DDDPolygon.h.
DDDObject::Mode casa::DDDPolygon::itsMode [private] |
Mode.
Definition at line 134 of file DDDPolygon.h.
uInt casa::DDDPolygon::itsNPoints [private] |
Definition at line 123 of file DDDPolygon.h.
Bool casa::DDDPolygon::itsOutline [private] |
Fill style.
Definition at line 118 of file DDDPolygon.h.
Vector<Double> casa::DDDPolygon::itsPixelX [private] |
Definition at line 122 of file DDDPolygon.h.
Vector<Double> casa::DDDPolygon::itsPixelY [private] |
Definition at line 122 of file DDDPolygon.h.
Bool casa::DDDPolygon::itsRecompute [private] |
In function draw(), recompute all pixel coordinates when true else use what is currently set.
Definition at line 143 of file DDDPolygon.h.
WorldCanvas* casa::DDDPolygon::itsWorldCanvasPtr [private] |
pointer to world canvas (shallow copy)
Definition at line 153 of file DDDPolygon.h.
Quantum<Vector<Double> > casa::DDDPolygon::itsWorldX [private] |
Define x and y.
Definition at line 121 of file DDDPolygon.h.
Quantum<Vector<Double> > casa::DDDPolygon::itsWorldY [private] |
Definition at line 121 of file DDDPolygon.h.