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

#include <DSScreenArrow.h>

Inheritance diagram for casa::DSScreenArrow:
casa::DSArrow casa::DisplayShapeWithCoords casa::DSLine casa::DSPolyLine casa::DSBasic casa::DisplayShape

Public Member Functions

 DSScreenArrow ()
 
 DSScreenArrow (const casacore::Record &settings, PixelCanvas *pc)
 
 DSScreenArrow (DSPixelArrow &other, PixelCanvas *pc)
 
 DSScreenArrow (DSWorldArrow &other)
 
virtual ~DSScreenArrow ()
 
virtual void recalculateScreenPosition ()
 
virtual void move (const casacore::Float &dX, const casacore::Float &dY)
 So we can update our Screen pos (relative) More...
 
virtual void setCenter (const casacore::Float &xPos, const casacore::Float &yPos)
 This does nothing, it's so arrow and other inheriting classes can take note of new centers. 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 setStartPoint (const casacore::Vector< casacore::Float > &startPoint)
 Standard (changePoint) and specific funtions for altering the arrow. More...
 
virtual void setEndPoint (const casacore::Vector< casacore::Float > &endPoint)
 
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)
 Point manipulation functions. More...
 
virtual casacore::Bool setOptions (const casacore::Record &settings)
 Set options. More...
 
virtual casacore::Record getOptions ()
 Return an option record describing the shape. More...
 
virtual casacore::Record getRawOptions ()
 
- Public Member Functions inherited from casa::DSArrow
 DSArrow ()
 Default constructor. More...
 
 DSArrow (const casacore::Vector< casacore::Float > &startPoint, const casacore::Vector< casacore::Float > &endPoint, DSArrow::ArrowHead style=DSArrow::Cool_Triangle, const casacore::Int arrowHeadSize=8)
 The start and end point are in pixel co-ordinates. More...
 
 DSArrow (const DSArrow &other)
 Copy constructor. More...
 
virtual ~DSArrow ()
 Destructor. More...
 
virtual void draw (PixelCanvas *pc)
 Standard Display Shape functions. More...
 
virtual void rotateAbout (const casacore::Float &angle, const casacore::Float &aboutX, const casacore::Float &aboutY)
 Does nothing currently. More...
 
virtual void setLength (const casacore::Float &pixelLength)
 These are to enable the use of arrows more easily in vector plots. More...
 
virtual void setAngle (const casacore::Float &angle)
 
- Public Member Functions inherited from casa::DSLine
 DSLine ()
 Constructors and Destructors. More...
 
 DSLine (const DSLine &other)
 
 DSLine (const casacore::Vector< casacore::Float > &startPos, const casacore::Vector< casacore::Float > &endPos, const casacore::Bool &handles=true, const casacore::Bool &drawHandles=true)
 
virtual ~DSLine ()
 
virtual casacore::Bool isValid ()
 Does this line have a valid start and a valid end? More...
 
- Public Member Functions inherited from casa::DSPolyLine
 DSPolyLine ()
 Constructors and Destructors. More...
 
 DSPolyLine (const DSPolyLine &other)
 
 DSPolyLine (const casacore::Matrix< casacore::Float > &points, const casacore::Bool &handles, const casacore::Bool &drawHandles)
 
virtual ~DSPolyLine ()
 
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 addPoint (const casacore::Vector< casacore::Float > &newPos)
 If applicable, this function will add a point to the shape in the most meaningful location. More...
 
virtual void setPoints (const casacore::Matrix< casacore::Float > &points)
 
virtual casacore::uInt nPoints ()
 Return the number of points. More...
 
- 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 updateRelative ()
 

Private Attributes

PixelCanvasitsPC
 The pixelcanvas we are using. More...
 
casacore::Vector< casacore::FloatitsRelativeStart
 The center of the marker in world co-ords. More...
 
casacore::Vector< casacore::FloatitsRelativeEnd
 

Additional Inherited Members

- Public Types inherited from casa::DSArrow
enum  ArrowHead {
  Open_Triangle,
  Filled_Triangle,
  Cool_Triangle
}
 Supported arrow head types. 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)
 
- Static Public Attributes inherited from casa::DSArrow
static const int numArrowHeads
 For checking setoptions(arrowheadstyle = ?) More...
 
- Protected Member Functions inherited from casa::DSLine
virtual casacore::Bool validStart ()
 
virtual casacore::Bool validEnd ()
 
virtual casacore::Matrix
< casacore::Float
getEnds ()
 General utility functions. More...
 
virtual casacore::Matrix
< casacore::Float
asPolyLine (const casacore::Vector< casacore::Float > &startPos, const casacore::Vector< casacore::Float > &endPos)
 
- Protected Member Functions inherited from casa::DSPolyLine
virtual casacore::Matrix
< casacore::Float
getPoints ()
 Return all my points. More...
 

Detailed Description

Definition at line 52 of file DSScreenArrow.h.

Constructor & Destructor Documentation

casa::DSScreenArrow::DSScreenArrow ( )
casa::DSScreenArrow::DSScreenArrow ( const casacore::Record settings,
PixelCanvas pc 
)
casa::DSScreenArrow::DSScreenArrow ( DSPixelArrow other,
PixelCanvas pc 
)
casa::DSScreenArrow::DSScreenArrow ( DSWorldArrow other)
virtual casa::DSScreenArrow::~DSScreenArrow ( )
virtual

Member Function Documentation

virtual void casa::DSScreenArrow::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::DSArrow.

virtual void casa::DSScreenArrow::changePoint ( const casacore::Vector< casacore::Float > &  pos)
virtual

Point manipulation functions.

The changePoint with only one argument moves the closest point to the location specified.

Reimplemented from casa::DSArrow.

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

Return an option record describing the shape.

Reimplemented from casa::DSArrow.

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

Implements casa::DisplayShapeWithCoords.

Definition at line 80 of file DSScreenArrow.h.

References casa::DSArrow::getOptions().

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

So we can update our Screen pos (relative)

Reimplemented from casa::DSArrow.

virtual void casa::DSScreenArrow::recalculateScreenPosition ( )
virtual

Reimplemented from casa::DisplayShape.

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

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

Reimplemented from casa::DSArrow.

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

Scale the shape about its center by the scaleFactor.

Reimplemented from casa::DSArrow.

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

This does nothing, it's so arrow and other inheriting classes can take note of new centers.

Reimplemented from casa::DSArrow.

virtual void casa::DSScreenArrow::setEndPoint ( const casacore::Vector< casacore::Float > &  endPoint)
virtual

Reimplemented from casa::DSArrow.

virtual casacore::Bool casa::DSScreenArrow::setOptions ( const casacore::Record newSettings)
virtual

Set options.

Reimplemented from casa::DSArrow.

virtual void casa::DSScreenArrow::setStartPoint ( const casacore::Vector< casacore::Float > &  startPoint)
virtual

Standard (changePoint) and specific funtions for altering the arrow.

the changePoint method with only one argument will move the closest point to the specified new point. When speciffyin 'n', in this case only 0 or 1 are valid. The 'startpoint' is the one with the arrow head on it.

Reimplemented from casa::DSArrow.

void casa::DSScreenArrow::updateRelative ( )
private

Member Data Documentation

PixelCanvas* casa::DSScreenArrow::itsPC
private

The pixelcanvas we are using.

Definition at line 87 of file DSScreenArrow.h.

casacore::Vector<casacore::Float> casa::DSScreenArrow::itsRelativeEnd
private

Definition at line 91 of file DSScreenArrow.h.

casacore::Vector<casacore::Float> casa::DSScreenArrow::itsRelativeStart
private

The center of the marker in world co-ords.

Definition at line 90 of file DSScreenArrow.h.


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