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

#include <DSWorldPoly.h>

Inheritance diagram for casa::DSWorldPoly:
casa::DSPoly casa::DisplayShapeWithCoords casa::DSClosed casa::DSBasic casa::DisplayShape

Public Member Functions

 DSWorldPoly ()
 
 DSWorldPoly (const casacore::Record &settings, PanelDisplay *pd)
 
 DSWorldPoly (DSScreenPoly &other, PanelDisplay *pd)
 
 DSWorldPoly (DSPixelPoly &other, PanelDisplay *pd)
 
 DSWorldPoly (DSWorldPolyLine &other)
 
virtual ~DSWorldPoly ()
 
virtual void recalculateScreenPosition ()
 
virtual void move (const casacore::Float &dX, const casacore::Float &dY)
 So we can update our WCs. More...
 
virtual void setCenter (const casacore::Float &xPos, const casacore::Float &yPos)
 Sets the center of the DisplayShape. More...
 
virtual void rotate (const casacore::Float &angle)
 Rotate the shape about its center by a set angle (angle in degrees). More...
 
virtual void scale (const casacore::Float &scaleFactor)
 Scale the shape about its center by the scaleFactor. More...
 
virtual void addPoint (const casacore::Vector< casacore::Float > &newPos)
 Polygon specific functions, add, delete and set points, all in pixels. More...
 
virtual void setPoints (const casacore::Matrix< casacore::Float > &points)
 
virtual void changePoint (const casacore::Vector< casacore::Float > &pos, const casacore::Int n)
 Changes the nth point making up the DisplayShape ot the specified location. More...
 
virtual void changePoint (const casacore::Vector< casacore::Float > &pos)
 Changes the closest point to the supplied location to that location. More...
 
virtual void draw (PixelCanvas *pc)
 General DisplayShape functions. More...
 
virtual casacore::Bool setOptions (const casacore::Record &settings)
 
virtual casacore::Record getOptions ()
 Get and set options. More...
 
virtual casacore::Record getRawOptions ()
 
virtual PanelDisplaypanelDisplay ()
 
- Public Member Functions inherited from casa::DSPoly
 DSPoly ()
 Constructors and destructor. More...
 
 DSPoly (const DSPoly &other)
 
 DSPoly (const casacore::Matrix< casacore::Float > &points, const casacore::Bool &handles=false, const casacore::Bool &drawHandles=false)
 
virtual ~DSPoly ()
 
virtual casacore::Bool inObject (const casacore::Float &xPos, const casacore::Float &yPos)
 Is the supplied point within the DisplayShape? More...
 
virtual casacore::Vector
< casacore::Float
getCenter ()
 Returns the center of the DisplayShape (x,y). More...
 
virtual void rotateAbout (const casacore::Float &angle, const casacore::Float &aboutX, const casacore::Float &aboutY)
 
virtual void deletePoint (const casacore::Vector< casacore::Float > &removePoint)
 
virtual void deletePoint (const casacore::Int nPoint)
 
- Public Member Functions inherited from casa::DSClosed
 DSClosed ()
 Constructors and destructors. More...
 
 DSClosed (const DSClosed &other)
 
virtual ~DSClosed ()
 
virtual void setFillStyle (DSClosed::FillStyle fill)
 Get / Set fill options. More...
 
virtual DSClosed::FillStyle getFillStyle ()
 
virtual void setFillColor (casacore::String color)
 
virtual casacore::String getFillColor ()
 
- Public Member Functions inherited from casa::DSBasic
 DSBasic ()
 Default constructor. More...
 
 DSBasic (const DSBasic &other)
 Copy constructor. More...
 
virtual ~DSBasic ()
 Destructor. More...
 
virtual void setLineWidth (const casacore::Int pixels)
 Manage line width. More...
 
virtual casacore::Int getLineWidth ()
 
- Public Member Functions inherited from casa::DisplayShape
 DisplayShape ()
 Default constructor. More...
 
 DisplayShape (const DisplayShape &other)
 Copy constructor. More...
 
virtual ~DisplayShape ()
 Destructor. More...
 
virtual casacore::Matrix
< casacore::Float
rotatePolygon (const casacore::Matrix< casacore::Float > &toRotate, const casacore::Float &angle, const casacore::Float &aboutX, const casacore::Float &aboutY)
 Rotate the supplied polygon (column 1 - x values, column 2 - y values) about the supplied point by the supplied angle. More...
 
virtual casacore::Vector
< casacore::Float
rotatePoint (const casacore::Vector< casacore::Float > &toRotate, const casacore::Float &angle, const casacore::Float &aboutX, const casacore::Float &aboutY)
 Rotates a point around the point specified. More...
 
virtual casacore::Matrix
< casacore::Float
translateMatrix (const casacore::Matrix< casacore::Float > &points, const casacore::Float &dx, const casacore::Float &dy)
 Translate an entire matrix by the specified dx / dy amounts. More...
 
virtual casacore::Bool inPolygon (const casacore::Matrix< casacore::Float > &points, const casacore::Float &xPos, const casacore::Float &yPos)
 Is xPos, YPos inside the supplied points (column 1 - x values, clolumn 2 - y values) More...
 
virtual casacore::Bool closestLine (const casacore::Matrix< casacore::Float > &points, const casacore::Float &xPos, const casacore::Float &yPos, casacore::Int &firstVert, casacore::Int &secondVert, const casacore::Bool &closedPoly=true)
 Determine the two vertices (firstVert, secondVert) which join the line closest to the xPos, yPos point supplied. More...
 
virtual casacore::Bool closestPoint (const casacore::Matrix< casacore::Float > &points, const casacore::Float &xPos, const casacore::Float &yPos, casacore::Int &out)
 For a specified set of points, find the closest to xPos,YPos. More...
 
virtual casacore::Bool closestPoints (const casacore::Matrix< casacore::Float > &points, const casacore::Float &xPos, const casacore::Float &yPos, casacore::Int &outClosest, casacore::Int &outSecond)
 Find the closest two Points from a casacore::Matrix to the specified point. More...
 
virtual casacore::Float toRadians (const casacore::Float &degrees)
 Convert degrees to radians. More...
 
virtual casacore::Float toDegrees (const casacore::Float &radians)
 Conver radians to degree. More...
 
virtual void addLocked (DisplayShape *toLock)
 Allow locking of other shapes onto this one. More...
 
virtual void removeLocked (DisplayShape *removeLock)
 Removes a lock from the specified shape. More...
 
virtual void buildHandles (const casacore::Matrix< casacore::Float > &startPoints)
 Handle management. More...
 
virtual casacore::Matrix
< casacore::Float
getHandleLocations ()
 
virtual void setHandlePositions (const casacore::Matrix< casacore::Float > &newPoints)
 
virtual DSClosedmakeHandle (const casacore::Vector< casacore::Float > &newHandlePos)
 
virtual void addHandle (const casacore::Vector< casacore::Float > &newHandlePos, const casacore::Bool &atEnd=true, const casacore::Int position=0)
 
virtual casacore::Bool removeHandle (const casacore::Vector< casacore::Float > &getRidOf)
 
virtual casacore::Bool removeHandle (const casacore::Int nHandle)
 
virtual casacore::Bool onHandles (const casacore::Float &xPos, const casacore::Float &yPos)
 
virtual casacore::Bool whichHandle (const casacore::Float &xPos, const casacore::Float &yPos, casacore::Int &out)
 
virtual void setDrawHandles (const casacore::Bool &shouldIDraw)
 
virtual casacore::Bool drawingHandles ()
 
virtual void setHasHandles (const casacore::Bool &hasHandles)
 
virtual void setHandleShape (const DisplayShape::HandleShape &shape)
 
virtual void setHandleSize (const casacore::Int pixelSize)
 
virtual void setHandleColor (const casacore::String &handleColor)
 
virtual casacore::uInt nHandles ()
 
virtual void setColor (const casacore::String &newColor)
 Manage the color of object. More...
 
virtual casacore::String getColor ()
 
- Public Member Functions inherited from casa::DisplayShapeWithCoords
virtual ~DisplayShapeWithCoords ()
 

Private Member Functions

void updateWCoords ()
 

Private Attributes

PanelDisplayitsPD
 The paneldisplay from which I may choose an appropriate WC. More...
 
WorldCanvasitsWC
 The WC of my choosing. More...
 
casacore::Vector
< casacore::Quantum
< casacore::Double > > 
itsWorldXPoints
 The center of the marker in world co-ords. More...
 
casacore::Vector
< casacore::Quantum
< casacore::Double > > 
itsWorldYPoints
 

Additional Inherited Members

- Public Types inherited from casa::DSClosed
enum  FillStyle {
  No_Fill,
  Full_Fill
}
 Type of fill to use. More...
 
- Public Types inherited from casa::DisplayShape
enum  HandleShape {
  Filled_Square,
  Open_Square,
  Filled_Circle,
  Open_Circle,
  Filled_Triangle,
  Open_Triangle
}
 Handle style. More...
 
- Static Public Member Functions inherited from casa::DisplayShapeWithCoords
static void floatToPix (casacore::Record &inHere, const casacore::String &field)
 
static void floatPointToPix (casacore::Record &inHere, const casacore::String &field)
 
static void matrixFloatToQuant (casacore::Record &inHere, const casacore::String &field, const casacore::String &unit)
 
static void matrixFloatFromQuant (casacore::Record &inHere, const casacore::String &field, const casacore::String &onlyParseTheseUnits)
 
static void floatFromPix (casacore::Record &inHere, const casacore::String &field)
 
static void floatPointFromPix (casacore::Record &inHere, const casacore::String &field)
 
static WorldCanvaschooseWCFromWorldPoint (const casacore::Record &settings, PanelDisplay *pd)
 
static WorldCanvaschooseWCFromWorldPoints (const casacore::Record &settings, const casacore::String &fieldWithPoints, PanelDisplay *pd)
 
static WorldCanvaschooseWCFromPixPoint (const casacore::Float &xPos, const casacore::Float &yPos, PanelDisplay *pd)
 
static WorldCanvaschooseWCFromPixPoints (const casacore::Matrix< casacore::Float > points, PanelDisplay *pd)
 
static casacore::Vector
< casacore::Float
floatPointFromQuant (const casacore::Record &inHere, const casacore::String &field, casacore::String &units)
 
static casacore::Vector
< casacore::Float
relToScreen (const casacore::Vector< casacore::Float > &rel, PixelCanvas *pc)
 
static casacore::Vector
< casacore::Float
screenToRel (const casacore::Vector< casacore::Float > &screen, PixelCanvas *pc)
 
static casacore::Matrix
< casacore::Float
relToScreen (const casacore::Matrix< casacore::Float > &rel, PixelCanvas *pc)
 
static casacore::Matrix
< casacore::Float
screenToRel (const casacore::Matrix< casacore::Float > &screen, PixelCanvas *pc)
 
static casacore::Bool inWorldCanvasDrawArea (const casacore::Matrix< casacore::Float > points, WorldCanvas *wc)
 
static void pixelToWorldPoints (casacore::Record &inHere, const casacore::String &fieldname, WorldCanvas *wc)
 
- Protected Member Functions inherited from casa::DSPoly
virtual casacore::Matrix
< casacore::Float
getPoints ()
 

Detailed Description

Definition at line 53 of file DSWorldPoly.h.

Constructor & Destructor Documentation

casa::DSWorldPoly::DSWorldPoly ( )
casa::DSWorldPoly::DSWorldPoly ( const casacore::Record settings,
PanelDisplay pd 
)
casa::DSWorldPoly::DSWorldPoly ( DSScreenPoly other,
PanelDisplay pd 
)
casa::DSWorldPoly::DSWorldPoly ( DSPixelPoly other,
PanelDisplay pd 
)
casa::DSWorldPoly::DSWorldPoly ( DSWorldPolyLine other)
virtual casa::DSWorldPoly::~DSWorldPoly ( )
virtual

Member Function Documentation

virtual void casa::DSWorldPoly::addPoint ( const casacore::Vector< casacore::Float > &  newPoint)
virtual

Polygon specific functions, add, delete and set points, all in pixels.

Add point decides the best place in the array to insert the new point. Similarly, deletePoints(const casacore::Vector<casacore::Float>& remove) deletes the point closest to that provided.

Reimplemented from casa::DSPoly.

virtual void casa::DSWorldPoly::changePoint ( const casacore::Vector< casacore::Float > &  newPoint,
const casacore::Int  nPoint 
)
virtual

Changes the nth point making up the DisplayShape ot the specified location.

Reimplemented from casa::DSPoly.

virtual void casa::DSWorldPoly::changePoint ( const casacore::Vector< casacore::Float > &  newPos)
virtual

Changes the closest point to the supplied location to that location.

Reimplemented from casa::DSPoly.

virtual void casa::DSWorldPoly::draw ( PixelCanvas pc)
virtual

General DisplayShape functions.

Reimplemented from casa::DSPoly.

virtual casacore::Record casa::DSWorldPoly::getOptions ( )
virtual

Get and set options.

Reimplemented from casa::DSPoly.

virtual casacore::Record casa::DSWorldPoly::getRawOptions ( )
inlinevirtual

Implements casa::DisplayShapeWithCoords.

Definition at line 87 of file DSWorldPoly.h.

References casa::DSPoly::getOptions().

virtual void casa::DSWorldPoly::move ( const casacore::Float dX,
const casacore::Float dY 
)
virtual

So we can update our WCs.

Reimplemented from casa::DSPoly.

virtual PanelDisplay* casa::DSWorldPoly::panelDisplay ( )
inlinevirtual

Definition at line 91 of file DSWorldPoly.h.

References itsPD.

virtual void casa::DSWorldPoly::recalculateScreenPosition ( )
virtual

Reimplemented from casa::DisplayShape.

virtual void casa::DSWorldPoly::rotate ( const casacore::Float angle)
virtual

Rotate the shape about its center by a set angle (angle in degrees).

Reimplemented from casa::DSPoly.

virtual void casa::DSWorldPoly::scale ( const casacore::Float scaleFactor)
virtual

Scale the shape about its center by the scaleFactor.

Reimplemented from casa::DSPoly.

virtual void casa::DSWorldPoly::setCenter ( const casacore::Float xPos,
const casacore::Float yPos 
)
virtual

Sets the center of the DisplayShape.

Reimplemented from casa::DSPoly.

virtual casacore::Bool casa::DSWorldPoly::setOptions ( const casacore::Record settings)
virtual

Reimplemented from casa::DSPoly.

virtual void casa::DSWorldPoly::setPoints ( const casacore::Matrix< casacore::Float > &  points)
virtual

Reimplemented from casa::DSPoly.

void casa::DSWorldPoly::updateWCoords ( )
private

Member Data Documentation

PanelDisplay* casa::DSWorldPoly::itsPD
private

The paneldisplay from which I may choose an appropriate WC.

Definition at line 98 of file DSWorldPoly.h.

Referenced by panelDisplay().

WorldCanvas* casa::DSWorldPoly::itsWC
private

The WC of my choosing.

Definition at line 101 of file DSWorldPoly.h.

casacore::Vector<casacore::Quantum<casacore::Double> > casa::DSWorldPoly::itsWorldXPoints
private

The center of the marker in world co-ords.

Definition at line 104 of file DSWorldPoly.h.

casacore::Vector<casacore::Quantum<casacore::Double> > casa::DSWorldPoly::itsWorldYPoints
private

Definition at line 105 of file DSWorldPoly.h.


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