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::DDDEllipse Class Reference

Implementation of an ellipse/rectangle object for DrawingDisplayData class. More...

#include <DDDEllipse.h>

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

List of all members.

Public Member Functions

 DDDEllipse (const Record &description, DrawingDisplayData *owner)
 Constructor taking a Record description.
virtual ~DDDEllipse ()
 Destructor.
virtual void draw (const Display::RefreshReason &reason, WorldCanvas *worldcanvas)
 Draw this 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 &ev)
 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

 DDDEllipse ()
 
   

 DDDEllipse (const DDDEllipse &other)
 (Required) copy constructor.
void operator= (const DDDEllipse &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
Matrix< InttoIntPixel (const Matrix< Double > &points)
void listWorld ()
 Debugging routines.
void listPixel ()

Private Attributes

Bool itsOutline
 Fill style.
Vector< Quantum< Double > > itsWorldParameters
 Define center x, center y, major, minor, pa in world.
Vector< DoubleitsPixelCenter
 Define center x, center y, major, minor, pa (radians) in screen pixel.
Vector< DoubleitsPixelShape
Matrix< DoubleitsCorners
 Rotated Rectangle Corners to draw in screen pixel.
Matrix< DoubleitsPixelOffsets
Block< DDDHandleitsHandles
 List of handles.
DDDObject::Mode itsMode
 Mode.
Double itsBaseMoveX
 Store for movement bases.
Double itsBaseMoveY
LogIO itsLogger
 Logger.
CoordinateSystem itsCoordinateSystem
 CoordinateSystem in screen pixel coordinates.
WorldCanvasitsWorldCanvasPtr
 pointer to world canvas (shallow copy)
Bool itsRectangle
 are we drawing a rectangle or an ellipse ?
Bool itsFracX
 Fractional indicators.
Bool itsFracY
Bool itsDoRef
 Do world/pixel conversions at reference location ?

Detailed Description

Implementation of an ellipse/rectangle object for DrawingDisplayData class.

Synopsis

This class implements the interface defined by DDDObject, to provide an ellipse or rectangle object for registration with DrawingDisplayData objects. The widths are all full widths.

Definition at line 65 of file DDDEllipse.h.


Constructor & Destructor Documentation

casa::DDDEllipse::DDDEllipse ( 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 : center (vector of quanta length 2), major, minor, positionangle (all quanta).

Units 'frac' ([0->1]) are available for the center only. Units 'pix' (absolute 0-rel image pixels) are available for the major and minor only.

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. If the field rectangle=True a rectangle is drawn. If it does not exist or is False, an ellipse is drawn.

Finally, field doreference which defaults to False is used to control the location at which conversions to and from pixel coordinates are done. If True then all conversions are done at the reference value. Otherwise, the conversions are done at the actual location of the shape. For example, with a DirectionCoordinate plane, setting doreference=True will cause the shape to rotate as you move it about the display as the position angle tracks the local North.

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

Destructor.

   

(Required) default constructor.

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

(Required) copy constructor.


Member Function Documentation

COnvert parameters from world to pixel.

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

compute corners of rectangle

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

Decode record into private data.

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

Return a record describing this object.

Presently returns only construction description.

Reimplemented from casa::DDDObject.

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

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

Implements casa::DDDObject.

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

Encode private data into record.

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

Debugging routines.

virtual void casa::DDDEllipse::operator() ( const WCRefreshEvent ev) [virtual]

Event handlers.

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

Implements casa::DDDObject.

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

Default just prints the event to cout.

Implements casa::DDDObject.

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

default sends event to cout

Implements casa::DDDObject.

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

(Required) copy assignment.

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

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

Reimplemented from casa::DDDObject.

Matrix<Int> casa::DDDEllipse::toIntPixel ( const Matrix< Double > &  points) [private]

Update private world parameters from current pixel values.


Member Data Documentation

Store for movement bases.

Definition at line 156 of file DDDEllipse.h.

Definition at line 156 of file DDDEllipse.h.

CoordinateSystem in screen pixel coordinates.

Definition at line 163 of file DDDEllipse.h.

Rotated Rectangle Corners to draw in screen pixel.

Definition at line 143 of file DDDEllipse.h.

Do world/pixel conversions at reference location ?

Definition at line 175 of file DDDEllipse.h.

Fractional indicators.

Definition at line 172 of file DDDEllipse.h.

Definition at line 172 of file DDDEllipse.h.

List of handles.

Definition at line 148 of file DDDEllipse.h.

Logger.

Definition at line 160 of file DDDEllipse.h.

Mode.

Definition at line 152 of file DDDEllipse.h.

Fill style.

Definition at line 134 of file DDDEllipse.h.

Define center x, center y, major, minor, pa (radians) in screen pixel.

Definition at line 140 of file DDDEllipse.h.

Definition at line 144 of file DDDEllipse.h.

Definition at line 140 of file DDDEllipse.h.

are we drawing a rectangle or an ellipse ?

Definition at line 169 of file DDDEllipse.h.

pointer to world canvas (shallow copy)

Definition at line 166 of file DDDEllipse.h.

Define center x, center y, major, minor, pa in world.

Definition at line 137 of file DDDEllipse.h.


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