casa
$Rev:20696$
|
Implementation of a marker. More...
#include <DSMarker.h>
Public Member Functions | |
DSMarker () | |
Constructors and destructor. | |
DSMarker (const Float &xPos, const Float &yPos, const Display::Marker &marker=Display::Square, const uInt pixelSize=10) | |
DSMarker (const Record &settings) | |
DSMarker (const DSPCMarker &other) | |
DSMarker (const DSWCMarker &other) | |
DSMarker (const DSMarker &other) | |
virtual | ~DSMarker () |
virtual void | move (const Float &dX, const Float &dY) |
Standard DisplayShape functions. | |
virtual void | setCenter (const Float &xPos, const Float &yPos) |
Sets the center of the DisplayShape. | |
virtual Vector< Float > | getCenter () |
Returns the center of the DisplayShape (x,y). | |
virtual void | scale (const Float &scaleFactor) |
Scale the shape about its center by the scaleFactor. | |
virtual void | draw (PixelCanvas *pc) |
Standard fns. | |
virtual Bool | inObject (const Float &xPos, const Float &yPos) |
Is the supplied point within the DisplayShape? | |
virtual void | setSize (const uInt newSize) |
virtual Bool | setOptions (const Record &settings) |
Get and set options. | |
virtual Record | getOptions () |
Settings. | |
virtual Bool | whichHandle (const Float &, const Float &, Int &) |
Overload, since we never want to click on a marker (Well actually we might, but as yet we have no use, and sometimes people think that have clicked on a marker when actually they are on a handle. | |
virtual void | rotate (const Float &) |
These functions do not apply for DSMarkers. | |
virtual void | changePoint (const Vector< Float > &) |
Changes the closest point to the supplied location to that location. | |
virtual void | changePoint (const Vector< Float > &, const Int) |
Changes the nth point making up the DisplayShape ot the specified location. | |
Private Member Functions | |
virtual void | setDefaultOptions () |
virtual void recalculateScreenPosition(); | |
void | updateHandle () |
Update location of single handle. | |
Private Attributes | |
Vector< Float > | itsCenter |
Matrix< Float > | itsHandle |
Bool | itsBuiltHandle |
DParameterRange< Int > * | itsSize |
Display::Marker | itsMarkerStyle |
Bool | itsValid |
Implementation of a marker.
DSMarker is a method of managind the drawing of a marker onto a pixel canvas.
DSArrow simply extends from DSLine, and adds the management of a polygon to it. The polygon is used to represent the arrow head, and various options regarding its apppearance can be changed.
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 .
A desire to have markers, similar to those used by PGPlot available as an annotation object. This wrapper is designed to make the management of drawing markers as primitives easier.
Definition at line 87 of file DSMarker.h.
Constructors and destructor.
See Display for a list of avaiable markers. Currently, all pixelHeights are changed to an even number, as odd sized markers tend to look funny. The pixelSize corresponds to the height of the marker in pixels.
casa::DSMarker::DSMarker | ( | const Float & | xPos, |
const Float & | yPos, | ||
const Display::Marker & | marker = Display::Square , |
||
const uInt | pixelSize = 10 |
||
) |
casa::DSMarker::DSMarker | ( | const Record & | settings | ) |
casa::DSMarker::DSMarker | ( | const DSPCMarker & | other | ) |
casa::DSMarker::DSMarker | ( | const DSWCMarker & | other | ) |
casa::DSMarker::DSMarker | ( | const DSMarker & | other | ) |
virtual casa::DSMarker::~DSMarker | ( | ) | [virtual] |
virtual void casa::DSMarker::changePoint | ( | const Vector< Float > & | newPos | ) | [inline, virtual] |
Changes the closest point to the supplied location to that location.
Implements casa::DisplayShape.
Definition at line 141 of file DSMarker.h.
virtual void casa::DSMarker::changePoint | ( | const Vector< Float > & | newPoint, |
const Int | nPoint | ||
) | [inline, virtual] |
Changes the nth point making up the DisplayShape ot the specified location.
Implements casa::DisplayShape.
Definition at line 142 of file DSMarker.h.
virtual void casa::DSMarker::draw | ( | PixelCanvas * | pc | ) | [virtual] |
virtual Vector<Float> casa::DSMarker::getCenter | ( | ) | [virtual] |
Returns the center of the DisplayShape (x,y).
Implements casa::DisplayShape.
virtual Record casa::DSMarker::getOptions | ( | ) | [virtual] |
Settings.
Reimplemented from casa::DSBasic.
Reimplemented in casa::DSWorldMarker, casa::DSScreenMarker, and casa::DSPixelMarker.
virtual Bool casa::DSMarker::inObject | ( | const Float & | xPos, |
const Float & | yPos | ||
) | [virtual] |
Is the supplied point within the DisplayShape?
Implements casa::DisplayShape.
virtual void casa::DSMarker::move | ( | const Float & | dX, |
const Float & | dY | ||
) | [virtual] |
Standard DisplayShape functions.
Reimplemented from casa::DSBasic.
Reimplemented in casa::DSScreenMarker, and casa::DSWorldMarker.
virtual void casa::DSMarker::rotate | ( | const Float & | ) | [inline, virtual] |
These functions do not apply for DSMarkers.
They are here to ensure no strange behavior
Implements casa::DisplayShape.
Definition at line 140 of file DSMarker.h.
virtual void casa::DSMarker::scale | ( | const Float & | scaleFactor | ) | [virtual] |
Scale the shape about its center by the scaleFactor.
Implements casa::DisplayShape.
virtual void casa::DSMarker::setCenter | ( | const Float & | xPos, |
const Float & | yPos | ||
) | [virtual] |
Sets the center of the DisplayShape.
Implements casa::DisplayShape.
Reimplemented in casa::DSScreenMarker, and casa::DSWorldMarker.
virtual void casa::DSMarker::setDefaultOptions | ( | ) | [private, virtual] |
virtual void recalculateScreenPosition();
Set the default options. Called by default constructor.
Reimplemented from casa::DisplayShape.
virtual Bool casa::DSMarker::setOptions | ( | const Record & | settings | ) | [virtual] |
Get and set options.
Reimplemented from casa::DSBasic.
Reimplemented in casa::DSWorldMarker, casa::DSScreenMarker, and casa::DSPixelMarker.
virtual void casa::DSMarker::setSize | ( | const uInt | newSize | ) | [virtual] |
void casa::DSMarker::updateHandle | ( | ) | [private] |
Update location of single handle.
virtual Bool casa::DSMarker::whichHandle | ( | const Float & | , |
const Float & | , | ||
Int & | |||
) | [inline, virtual] |
Overload, since we never want to click on a marker (Well actually we might, but as yet we have no use, and sometimes people think that have clicked on a marker when actually they are on a handle.
This makes it appear as though the marker isn't moving.
Reimplemented from casa::DisplayShape.
Definition at line 132 of file DSMarker.h.
References casa::False.
Bool casa::DSMarker::itsBuiltHandle [private] |
Definition at line 157 of file DSMarker.h.
Vector<Float> casa::DSMarker::itsCenter [private] |
Definition at line 155 of file DSMarker.h.
Matrix<Float> casa::DSMarker::itsHandle [private] |
Definition at line 156 of file DSMarker.h.
Definition at line 160 of file DSMarker.h.
DParameterRange<Int>* casa::DSMarker::itsSize [private] |
Definition at line 158 of file DSMarker.h.
Bool casa::DSMarker::itsValid [private] |
Definition at line 161 of file DSMarker.h.