casa  5.7.0-16
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Protected Member Functions | Private Attributes | List of all members
casa::DDDRectangle Class Reference

Implementation of a rectangular object for DrawingDisplayData class. More...

#include <DDDRectangle.h>

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

Public Member Functions

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

Protected Member Functions

 DDDRectangle ()
 (Required) default constructor. More...
 
 DDDRectangle (const DDDRectangle &other)
 (Required) copy constructor. More...
 
void operator= (const DDDRectangle &other)
 (Required) copy assignment. More...
 
- Protected Member Functions inherited from casa::DDDObject
DrawingDisplayDataowner ()
 Return the owner of this object. More...
 
casacore::String color () const
 Return the color to use to draw this object. More...
 
casacore::String label () const
 Return the label of this object. More...
 
casacore::Int lineWidth () const
 Return the line width of this object. More...
 
casacore::Bool isEditable () const
 
casacore::Bool isMovable () const
 
casacore::Bool isFixed () const
 
 DDDObject ()
 (Required) default constructor. More...
 
 DDDObject (const DDDObject &other)
 (Required) copy constructor. More...
 
void operator= (const DDDObject &other)
 (Required) copy assignment. More...
 
void translateMatrix (casacore::Matrix< casacore::Double > &points, casacore::Double dx, casacore::Double dy)
 Translate Matrix. More...
 
casacore::Matrix
< casacore::Double
rotateMatrix (const casacore::Matrix< casacore::Double > &points, casacore::Double angle)
 Rotate Matrix. More...
 
casacore::Bool inPolygon (const casacore::Matrix< casacore::Double > &points, casacore::Double x, casacore::Double y)
 Is point inside the polygon. More...
 
casacore::Bool inPolygon (const casacore::Vector< casacore::Double > &xP, const casacore::Vector< casacore::Double > &yP, casacore::Double x, casacore::Double y)
 
void convertCoordinateSystem (DisplayCoordinateSystem &cSys, WorldCanvas *wcPtr) const
 Convert DisplayCoordinateSystem to screen pixels. More...
 
casacore::Bool onHandle (const casacore::Block< DDDHandle > &handles, casacore::Double x, casacore::Double y)
 Is the point on a handle. More...
 

Private Attributes

casacore::Vector
< casacore::Double
itsBlc
 Blc and trc of rectangle in world coordinates. More...
 
casacore::Vector
< casacore::Double
itsTrc
 
casacore::Vector< casacore::IntitsHX
 Handle coordinates. More...
 
casacore::Vector< casacore::IntitsHY
 
DDDObject::Mode itsMode
 Mode. More...
 
casacore::Int itsBaseMoveX
 Store for movement bases. More...
 
casacore::Int itsBaseMoveY
 
casacore::Bool itsLeftHandle
 is it a left handle? a bottom handle? More...
 
casacore::Bool itsBottomHandle
 

Additional Inherited Members

- Public Types inherited from casa::DDDObject
enum  Mode {
  None,
  Handle,
  Move,
  Rotate
}
 

Detailed Description

Implementation of a rectangular object for DrawingDisplayData class.

Synopsis

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

Definition at line 47 of file DDDRectangle.h.

Constructor & Destructor Documentation

casa::DDDRectangle::DDDRectangle ( 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: blc and trc.

virtual casa::DDDRectangle::~DDDRectangle ( )
virtual

Destructor.

casa::DDDRectangle::DDDRectangle ( )
protected

(Required) default constructor.

casa::DDDRectangle::DDDRectangle ( const DDDRectangle other)
protected

(Required) copy constructor.

Member Function Documentation

virtual casacore::Record casa::DDDRectangle::description ( )
virtual

Return a record describing this object.

Reimplemented from casa::DDDObject.

virtual void casa::DDDRectangle::draw ( const Display::RefreshReason reason,
WorldCanvas worldcanvas 
)
virtual

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

Implements casa::DDDObject.

virtual void casa::DDDRectangle::operator() ( const WCRefreshEvent )
inlinevirtual

Event handlers.

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

Implements casa::DDDObject.

Definition at line 75 of file DDDRectangle.h.

virtual void casa::DDDRectangle::operator() ( const WCPositionEvent ev)
virtual

Default just prints the event to cout.

Implements casa::DDDObject.

virtual void casa::DDDRectangle::operator() ( const WCMotionEvent ev)
virtual

default sends event to cout

Implements casa::DDDObject.

void casa::DDDRectangle::operator= ( const DDDRectangle other)
protected

(Required) copy assignment.

virtual void casa::DDDRectangle::setDescription ( const casacore::Record rec)
virtual

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

Reimplemented from casa::DDDObject.

Member Data Documentation

casacore::Int casa::DDDRectangle::itsBaseMoveX
private

Store for movement bases.

Definition at line 105 of file DDDRectangle.h.

casacore::Int casa::DDDRectangle::itsBaseMoveY
private

Definition at line 105 of file DDDRectangle.h.

casacore::Vector<casacore::Double> casa::DDDRectangle::itsBlc
private

Blc and trc of rectangle in world coordinates.

Definition at line 96 of file DDDRectangle.h.

casacore::Bool casa::DDDRectangle::itsBottomHandle
private

Definition at line 108 of file DDDRectangle.h.

casacore::Vector<casacore::Int> casa::DDDRectangle::itsHX
private

Handle coordinates.

Definition at line 99 of file DDDRectangle.h.

casacore::Vector<casacore::Int> casa::DDDRectangle::itsHY
private

Definition at line 99 of file DDDRectangle.h.

casacore::Bool casa::DDDRectangle::itsLeftHandle
private

is it a left handle? a bottom handle?

Definition at line 108 of file DDDRectangle.h.

DDDObject::Mode casa::DDDRectangle::itsMode
private

Mode.

Definition at line 102 of file DDDRectangle.h.

casacore::Vector<casacore::Double> casa::DDDRectangle::itsTrc
private

Definition at line 96 of file DDDRectangle.h.


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