casa
5.7.0-16
|
Implementation of an ellipse/rectangle object for DrawingDisplayData class. More...
#include <DDDEllipse.h>
Public Member Functions | |
DDDEllipse (const casacore::Record &description, DrawingDisplayData *owner) | |
Constructor taking a casacore::Record description. More... | |
virtual | ~DDDEllipse () |
Destructor. More... | |
virtual void | draw (const Display::RefreshReason &reason, WorldCanvas *worldcanvas) |
Draw this object for the given reason on the provided WorldCanvas. More... | |
virtual casacore::Record | description () |
Return a record describing this object. More... | |
virtual void | setDescription (const casacore::Record &rec) |
Update this object based on the information in the provided Record. More... | |
virtual void | operator() (const WCRefreshEvent &ev) |
Event handlers. More... | |
virtual void | operator() (const WCPositionEvent &ev) |
Default just prints the event to cout. More... | |
virtual void | operator() (const WCMotionEvent &ev) |
default sends event to cout More... | |
Public Member Functions inherited from casa::DDDObject | |
DDDObject (const casacore::Record &description, DrawingDisplayData *owner) | |
Constructor taking a casacore::Record description. More... | |
virtual | ~DDDObject () |
Destructor. More... | |
virtual void | showHandles (const casacore::Bool show, const casacore::Bool tellOwner=true) |
Indicate whether the object should show its handles or not. More... | |
virtual casacore::Bool | showingHandles () |
Query whether the object is showing its handles. More... | |
virtual casacore::Bool | storeClick (const DisplayEvent &ev) |
Store a click in the buffer and look for a double-click event. More... | |
virtual void | clearClickBuffer () |
Clear the click buffer. More... | |
casacore::Int | objectID () const |
Return the unique id of this object. More... | |
Public Member Functions inherited from casa::WCRefreshEH | |
WCRefreshEH () | |
Default Constructor Required. More... | |
virtual | ~WCRefreshEH () |
Destructor. More... | |
Public Member Functions inherited from casa::DisplayEH | |
virtual void | handleEvent (DisplayEvent &) |
Classes that contain this interface (i.e., derive from it) can override this method to implement actions for whatever types of DisplayEvent they're interested in. More... | |
virtual | ~DisplayEH () |
Public Member Functions inherited from casa::WCMotionEH | |
WCMotionEH () | |
Default Constructor Required. More... | |
virtual | ~WCMotionEH () |
Destructor. More... | |
Public Member Functions inherited from casa::WCPositionEH | |
WCPositionEH () | |
Default Constructor Required. More... | |
virtual | ~WCPositionEH () |
Destructor. More... | |
Private Member Functions | |
void | convertToPixel () |
COnvert parameters from world to pixel. More... | |
void | updateWorldValues () |
Update private world parameters from current pixel values. More... | |
void | decode (const casacore::RecordInterface &description, casacore::Bool required) |
Decode record into private data. More... | |
void | encode (casacore::RecordInterface &description) const |
Encode private data into record. More... | |
void | createCorners () |
compute corners of rectangle More... | |
casacore::Matrix< casacore::Int > | toIntPixel (const casacore::Matrix< casacore::Double > &points) |
void | listWorld () |
Debugging routines. More... | |
void | listPixel () |
Additional Inherited Members | |
Public Types inherited from casa::DDDObject | |
enum | Mode { None, Handle, Move, Rotate } |
Implementation of an ellipse/rectangle object for DrawingDisplayData class.
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 69 of file DDDEllipse.h.
casa::DDDEllipse::DDDEllipse | ( | const casacore::Record & | description, |
DrawingDisplayData * | owner | ||
) |
Constructor taking a casacore::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 casacore::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 |
Destructor.
|
protected |
(Required) default constructor.
|
protected |
(Required) copy constructor.
|
private |
COnvert parameters from world to pixel.
|
private |
compute corners of rectangle
|
private |
Decode record into private data.
|
virtual |
Return a record describing this object.
Presently returns only construction description.
Reimplemented from casa::DDDObject.
|
virtual |
Draw this object for the given reason on the provided WorldCanvas.
Implements casa::DDDObject.
|
private |
Encode private data into record.
|
private |
|
private |
Debugging routines.
|
virtual |
Event handlers.
The parent DrawingDisplayData will distribute events as necessary to the various DDDObjects which comprise it.
Implements casa::DDDObject.
|
virtual |
Default just prints the event to cout.
Implements casa::DDDObject.
|
virtual |
default sends event to cout
Implements casa::DDDObject.
|
protected |
(Required) copy assignment.
|
virtual |
Update this object based on the information in the provided Record.
Reimplemented from casa::DDDObject.
|
private |
|
private |
Update private world parameters from current pixel values.
|
private |
Store for movement bases.
Definition at line 160 of file DDDEllipse.h.
|
private |
Definition at line 160 of file DDDEllipse.h.
|
private |
DisplayCoordinateSystem in screen pixel coordinates.
Definition at line 167 of file DDDEllipse.h.
|
private |
Rotated Rectangle Corners to draw in screen pixel.
Definition at line 147 of file DDDEllipse.h.
|
private |
Do world/pixel conversions at reference location ?
Definition at line 179 of file DDDEllipse.h.
|
private |
Fractional indicators.
Definition at line 176 of file DDDEllipse.h.
|
private |
Definition at line 176 of file DDDEllipse.h.
|
private |
casacore::List of handles
Definition at line 152 of file DDDEllipse.h.
|
private |
Logger.
Definition at line 164 of file DDDEllipse.h.
|
private |
Mode.
Definition at line 156 of file DDDEllipse.h.
|
private |
Fill style.
Definition at line 138 of file DDDEllipse.h.
|
private |
Define center x, center y, major, minor, pa (radians) in screen pixel.
Definition at line 144 of file DDDEllipse.h.
|
private |
Definition at line 148 of file DDDEllipse.h.
|
private |
Definition at line 144 of file DDDEllipse.h.
|
private |
are we drawing a rectangle or an ellipse ?
Definition at line 173 of file DDDEllipse.h.
|
private |
pointer to world canvas (shallow copy)
Definition at line 170 of file DDDEllipse.h.
|
private |
Define center x, center y, major, minor, pa in world.
Definition at line 141 of file DDDEllipse.h.