casa
5.7.0-16
|
Base class for all "basic" shapes. More...
#include <DSBasic.h>
Public Member Functions | |
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 () |
virtual void | draw (PixelCanvas *pc) |
Standard fns. More... | |
virtual void | rotateAbout (const casacore::Float &angle, const casacore::Float &aboutX, const casacore::Float &aboutY) |
virtual void | move (const casacore::Float &dX, const casacore::Float &dY) |
virtual casacore::Record | getOptions () |
Settings. More... | |
virtual casacore::Bool | setOptions (const casacore::Record &settings) |
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::Bool | inObject (const casacore::Float &xPos, const casacore::Float &yPos)=0 |
Is the supplied point within the DisplayShape? 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 | setCenter (const casacore::Float &xPos, const casacore::Float &yPos)=0 |
Sets the center of the DisplayShape. More... | |
virtual casacore::Vector < casacore::Float > | getCenter ()=0 |
Returns the center of the DisplayShape (x,y). More... | |
virtual void | changePoint (const casacore::Vector< casacore::Float > &newPos)=0 |
Changes the closest point to the supplied location to that location. More... | |
virtual void | changePoint (const casacore::Vector< casacore::Float > &newPoint, const casacore::Int nPoint)=0 |
Changes the nth point making up the DisplayShape ot the specified location. 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 | rotate (const casacore::Float &angle)=0 |
Rotate the shape about its center by a set angle (angle in degrees). More... | |
virtual void | scale (const casacore::Float &scaleFactor)=0 |
Scale the shape about its center by the scaleFactor. 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 Attributes | |
DParameterRange< casacore::Int > * | itsLineWidth |
Additional Inherited Members | |
Public Types inherited from casa::DisplayShape | |
enum | HandleShape { Filled_Square, Open_Square, Filled_Circle, Open_Circle, Filled_Triangle, Open_Triangle } |
Handle style. More... | |
Base class for all "basic" shapes.
DSBasic is a base for all basic classes, it manages linewidth.
DSBasic is a base class for any shape using basic lines to draw it self, i.e. shapes such as lines, circles and polygons should extend this class. More complex DisplayShapes, e.g. text should not.
A common interface for the setting of linewidths
casa::DSBasic::DSBasic | ( | ) |
Default constructor.
casa::DSBasic::DSBasic | ( | const DSBasic & | other | ) |
Copy constructor.
|
virtual |
Destructor.
|
virtual |
Standard fns.
Reimplemented from casa::DisplayShape.
Reimplemented in casa::DSArrow, casa::DSMarker, casa::DSClosed, casa::DSPolyLine, casa::DSPoly, casa::DSEllipse, casa::DSWorldPoly, casa::DSWorldPolyLine, casa::DSWorldArrow, casa::DSWorldEllipse, casa::DSWorldRectangle, and casa::DSWorldMarker.
|
virtual |
|
virtual |
Settings.
Reimplemented from casa::DisplayShape.
Reimplemented in casa::DSArrow, casa::DSMarker, casa::DSLine, casa::DSRectangle, casa::DSPolyLine, casa::DSPoly, casa::DSEllipse, casa::DSCircle, casa::DSSquare, casa::DSClosed, casa::DSWorldPoly, casa::DSWorldPolyLine, casa::DSScreenArrow, casa::DSWorldArrow, casa::DSWorldEllipse, casa::DSWorldRectangle, casa::DSScreenPoly, casa::DSScreenPolyLine, casa::DSWorldMarker, casa::DSPixelEllipse, casa::DSPixelRectangle, casa::DSPixelPoly, casa::DSScreenMarker, casa::DSScreenEllipse, casa::DSPixelPolyLine, casa::DSScreenRectangle, casa::DSPixelArrow, and casa::DSPixelMarker.
|
virtual |
Reimplemented from casa::DisplayShape.
Reimplemented in casa::DSArrow, casa::DSMarker, casa::DSRectangle, casa::DSClosed, casa::DSPolyLine, casa::DSPoly, casa::DSEllipse, casa::DSWorldPoly, casa::DSScreenArrow, casa::DSScreenPoly, casa::DSWorldEllipse, casa::DSWorldPolyLine, casa::DSWorldArrow, casa::DSWorldRectangle, casa::DSScreenMarker, casa::DSScreenPolyLine, casa::DSWorldMarker, casa::DSScreenEllipse, and casa::DSScreenRectangle.
|
virtual |
Reimplemented from casa::DisplayShape.
Reimplemented in casa::DSArrow, casa::DSRectangle, casa::DSPolyLine, casa::DSPoly, casa::DSClosed, and casa::DSEllipse.
|
virtual |
Manage line width.
|
virtual |
Reimplemented from casa::DisplayShape.
Reimplemented in casa::DSArrow, casa::DSMarker, casa::DSLine, casa::DSRectangle, casa::DSPoly, casa::DSPolyLine, casa::DSEllipse, casa::DSCircle, casa::DSSquare, casa::DSClosed, casa::DSWorldPoly, casa::DSWorldPolyLine, casa::DSScreenArrow, casa::DSWorldArrow, casa::DSWorldEllipse, casa::DSWorldRectangle, casa::DSScreenPoly, casa::DSScreenPolyLine, casa::DSWorldMarker, casa::DSPixelEllipse, casa::DSPixelRectangle, casa::DSPixelPoly, casa::DSScreenMarker, casa::DSPixelMarker, casa::DSScreenEllipse, casa::DSPixelPolyLine, casa::DSScreenRectangle, and casa::DSPixelArrow.
|
private |