casa
5.7.0-16
|
class PixelCanvas; class WorldCanvas; More...
#include <DisplayShapeInterface.h>
Public Types | |
enum | Coord { Pixels, Relative, World } |
Public Member Functions | |
DisplayShapeInterface (const casacore::Record &shapeInfo) | |
Constructor for a standard shape. More... | |
DisplayShapeInterface (const casacore::Record &shapeInfo, const PixelCanvas *pc, const casacore::Bool scale=true) | |
Constructor for shape based on relative screen positions. More... | |
DisplayShapeInterface (const casacore::Record shapeInfo, const WorldCanvas *wc) | |
Constructor for shape based on world co-ordinates (NYI) More... | |
DisplayShapeInterface (const DisplayShapeInterface &other) | |
Copy cons. More... | |
virtual | ~DisplayShapeInterface () |
virtual casacore::Bool | inObject (const casacore::Float xPos, const casacore::Float yPos) |
DisplayShape functionality. More... | |
virtual casacore::Bool | onHandles (const casacore::Float xPos, const casacore::Float yPos) |
virtual casacore::Vector < casacore::Float > | getCenter () const |
virtual void | setCenter (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 | changePoint (const casacore::Vector< casacore::Float > &newPos) |
virtual void | changePoint (const casacore::Vector< casacore::Float > &newPoint, const casacore::Int nPoint) |
virtual void | addPoint (const casacore::Vector< casacore::Float > &newPoint) |
virtual void | rotate (const casacore::Float angle) |
virtual void | scale (const casacore::Float angle) |
virtual void | draw (PixelCanvas *toDrawTo) |
virtual void | move (const casacore::Float dX, const casacore::Float dY) |
virtual void | addLocked (DisplayShapeInterface *toLock) |
virtual void | removeLocked (DisplayShapeInterface *removeLock) |
virtual void | setDrawHandles (const casacore::Bool &draw) |
virtual casacore::Bool | setOptions (const casacore::Record &newOptions) |
virtual casacore::Record | getOptions () |
virtual casacore::Bool | updatePixelPosition () |
Update the pixel location of this shape, based on the stored information on its location. More... | |
virtual casacore::Bool | updateNonPixelPosition () |
If the shape is being used in absolute pixel co-ordinates, this will do nothing. More... | |
virtual DisplayShape * | getObject () |
Returns the pointer to the underlying object. More... | |
virtual void | toPolygon () |
If the shape is a PolyLine, this function will change it to a polygon. More... | |
Private Member Functions | |
casacore::Record | toPixOpts (const casacore::Record ¬Pix) |
casacore::Record | fromPixOpts (const casacore::Record &pix) |
Will return an option set with whatever the current coords method is. More... | |
casacore::Record | pixToRelOpts (const casacore::Record &pixel) |
casacore::Record | relToPixOpts (const casacore::Record &relative) |
casacore::Record | pixToWorldOpts (const casacore::Record &pix) |
casacore::Record | worldToPixOpts (const casacore::Record &world) |
casacore::Vector< casacore::Float > | pixToRel (const casacore::Vector< casacore::Float > &pix) |
casacore::Vector< casacore::Float > | relToPix (const casacore::Vector< casacore::Float > &rel) |
casacore::Float | relToPixWidth (const casacore::Float rel) |
casacore::Float | relToPixHeight (const casacore::Float rel) |
casacore::Float | pixToRelWidth (const casacore::Float pix) |
casacore::Float | pixToRelHeight (const casacore::Float pix) |
void | makeShape (const casacore::Record &shapeInfo) |
Private Attributes | |
DisplayShape * | itsShape |
DisplayShapeInterface::Coord | itsCoords |
const PixelCanvas * | itsPc |
const WorldCanvas * | itsWc |
casacore::Bool | itsScale |
Scale widths and heights in relative mode? More... | |
casacore::Record | altCoords |
Copy of shape, however in its alternate coord form. More... | |
class PixelCanvas; class WorldCanvas;
Wrapper for DisplayShapes;provides easier/unified constr. of DisplayShapes
DisplayShapeInterface makes it easier to work with DisplayShapes.
DisplayShapeInterface simply contains a pointer to a DisplayShape object. It allows all DisplayShapes to be constructed via a single constructor. i.e. the DisplayShapeInterface constructor actually decides which shape to create based on the information in the casacore::Record passed to it. It makes creating new shapes look a little nice, since:
can both be simply made into a new DisplayShapeInterface, e.g.
It also guarantees consistant interfaces between shapes.
The creation of an interface to DisplayShapes makes use of the simpler.
Definition at line 86 of file DisplayShapeInterface.h.
Enumerator | |
---|---|
Pixels | |
Relative | |
World |
Definition at line 89 of file DisplayShapeInterface.h.
casa::DisplayShapeInterface::DisplayShapeInterface | ( | const casacore::Record & | shapeInfo | ) |
Constructor for a standard shape.
The shape will be totally based on pixel sizes, both for it's position and sizes.
casa::DisplayShapeInterface::DisplayShapeInterface | ( | const casacore::Record & | shapeInfo, |
const PixelCanvas * | pc, | ||
const casacore::Bool | scale = true |
||
) |
Constructor for shape based on relative screen positions.
if scaled is true, relative screen positions will be used for height etc also. If not, positions only will be based on relative screen pos, heights will be based on an absolute pixel value.
casa::DisplayShapeInterface::DisplayShapeInterface | ( | const casacore::Record | shapeInfo, |
const WorldCanvas * | wc | ||
) |
Constructor for shape based on world co-ordinates (NYI)
casa::DisplayShapeInterface::DisplayShapeInterface | ( | const DisplayShapeInterface & | other | ) |
Copy cons.
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
private |
Will return an option set with whatever the current coords method is.
|
virtual |
|
virtual |
Returns the pointer to the underlying object.
|
virtual |
|
virtual |
DisplayShape functionality.
All of these functions simply wrap those of the underlying DisplayShape (and add conversion functionality). Please see DisplayShape for a full description of these functions.
|
private |
|
virtual |
|
virtual |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
private |
|
virtual |
If the shape is a PolyLine, this function will change it to a polygon.
This is designed for use in the creation of polygon by the user clicking out a polyline, for example.
|
virtual |
If the shape is being used in absolute pixel co-ordinates, this will do nothing.
If being used in relative screen or WC mode, this will update the position based on its current pixel location. Returns false if the conversion to the other co-ord type fails.
|
virtual |
Update the pixel location of this shape, based on the stored information on its location.
If the shape is being used in pixel mode this will do nothing. If being used in relative screen mode or WC mode, this will update its location. Returns false if a conversion to pixels fail.
|
virtual |
|
private |
|
private |
Copy of shape, however in its alternate coord form.
Definition at line 186 of file DisplayShapeInterface.h.
|
private |
Definition at line 176 of file DisplayShapeInterface.h.
|
private |
Definition at line 177 of file DisplayShapeInterface.h.
|
private |
Scale widths and heights in relative mode?
Definition at line 183 of file DisplayShapeInterface.h.
|
private |
Definition at line 175 of file DisplayShapeInterface.h.
|
private |
Definition at line 178 of file DisplayShapeInterface.h.