casa
5.7.0-16
|
Circle implementation;extends DSEllipse, adding general circle functions. More...
#include <DSCircle.h>
Public Member Functions | |
DSCircle () | |
Constructors and destructors. More... | |
DSCircle (const casacore::Float &xPos, const casacore::Float &yPos, const casacore::Float &radius, const casacore::Bool &hasHandles, const casacore::Bool &drawHandles) | |
DSCircle (const DSCircle &other) | |
virtual | ~DSCircle () |
virtual void | rotate (const casacore::Float &) |
General DisplayShape functionality. More... | |
virtual void | setCenter (const casacore::Float &xPos, const casacore::Float &yPos) |
Sets the center of the DisplayShape. More... | |
virtual casacore::Bool | inObject (const casacore::Float &dX, const casacore::Float &dY) |
Is the supplied point within the DisplayShape? More... | |
virtual void | changePoint (const casacore::Vector< casacore::Float > &newPos) |
Changes the closest point to the supplied location to that location. More... | |
virtual void | changePoint (const casacore::Vector< casacore::Float > &newPos, const casacore::Int nPoint) |
Changes the nth point making up the DisplayShape ot the specified location. More... | |
virtual void | setRadius (const casacore::Float &radius) |
Circle specific functionality. More... | |
virtual void | setMajorAxis (const casacore::Float &) |
virtual void | setMinorAxis (const casacore::Float &) |
virtual casacore::Bool | setOptions (const casacore::Record &settings) |
Get and set options. More... | |
virtual casacore::Record | getOptions () |
Get and set options. More... | |
Public Member Functions inherited from casa::DSEllipse | |
DSEllipse (const casacore::Bool &onlyShowOneHandle=false) | |
Constructors and destructors. More... | |
DSEllipse (const DSEllipse &other) | |
DSEllipse (const casacore::Float &xPos, const casacore::Float &yPos, const casacore::Float &major, const casacore::Float &minor, const casacore::Bool &hasHandles=false, const casacore::Bool &drawHandles=false, const casacore::Bool &onlyShowOneHandle=false) | |
virtual | ~DSEllipse () |
virtual void | draw (PixelCanvas *pix) |
General DisplayShape functions. More... | |
virtual void | move (const casacore::Float &dX, const casacore::Float &dY) |
virtual void | rotateAbout (const casacore::Float &angle, const casacore::Float &aboutX, const casacore::Float &aboutY) |
virtual casacore::Vector < casacore::Float > | getCenter () |
Returns the center of the DisplayShape (x,y). More... | |
virtual void | scale (const casacore::Float &scaleFactor) |
Scale the shape about its center by the scaleFactor. More... | |
virtual casacore::Float | getMinorAxis () |
Functions to set / get the minor and major axis of the ellipse (in pixels). More... | |
virtual casacore::Float | getMajorAxis () |
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 °rees) |
Convert degrees to radians. More... | |
virtual casacore::Float | toDegrees (const casacore::Float &radians) |
Conver radians to degree. More... | |
virtual void | addPoint (const casacore::Vector< casacore::Float > &) |
If applicable, this function will add a point to the shape in the most meaningful location. 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 DSClosed * | makeHandle (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 () |
virtual void | recalculateScreenPosition () |
Private Member Functions | |
virtual void | setDefaultOptions () |
casacore::Function to set defaults when default constructor called More... | |
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... | |
Protected Member Functions inherited from casa::DSEllipse | |
virtual void | calculateHandlePositions () |
Required on update. More... | |
Circle implementation;extends DSEllipse, adding general circle functions.
DSCircle is a method of managing the drawing of a circle onto a PixelCanvas.
DSCircle simply extends from DSEllipse, and adds some general circle functionality. It basically replaces the set major and set minor axis functions with a setRadius function. Almost all of the functionality is contained in DSEllipse.
There are generally two ways to make DisplayShape(s); To create them in "one hit" by providing arguments to the constructor, or by using the default constructor and then the "setOptions" method. A simple interface for all classes inheriting from the DisplayShape class is provided by DisplayShapeInterface.
To enable display of circles onto a pixel canvas.
Definition at line 77 of file DSCircle.h.
casa::DSCircle::DSCircle | ( | ) |
Constructors and destructors.
casa::DSCircle::DSCircle | ( | const casacore::Float & | xPos, |
const casacore::Float & | yPos, | ||
const casacore::Float & | radius, | ||
const casacore::Bool & | hasHandles, | ||
const casacore::Bool & | drawHandles | ||
) |
casa::DSCircle::DSCircle | ( | const DSCircle & | other | ) |
|
virtual |
|
virtual |
Changes the closest point to the supplied location to that location.
Reimplemented from casa::DSEllipse.
|
virtual |
Changes the nth point making up the DisplayShape ot the specified location.
Reimplemented from casa::DSEllipse.
|
virtual |
Get and set options.
Reimplemented from casa::DSEllipse.
|
virtual |
Is the supplied point within the DisplayShape?
Reimplemented from casa::DSEllipse.
|
inlinevirtual |
General DisplayShape functionality.
Reimplemented from casa::DSEllipse.
Definition at line 92 of file DSCircle.h.
|
virtual |
Sets the center of the DisplayShape.
Reimplemented from casa::DSEllipse.
|
privatevirtual |
casacore::Function to set defaults when default constructor called
Reimplemented from casa::DSEllipse.
|
inlinevirtual |
Reimplemented from casa::DSEllipse.
Definition at line 102 of file DSCircle.h.
|
inlinevirtual |
Reimplemented from casa::DSEllipse.
Definition at line 103 of file DSCircle.h.
|
virtual |
Get and set options.
Reimplemented from casa::DSEllipse.
|
virtual |
Circle specific functionality.