casa
$Rev:20696$
|
Implementation of a square. More...
#include <DSSquare.h>
Public Member Functions | |
DSSquare () | |
Default constructor. | |
DSSquare (const Float &xPos, const Float &yPos, const Float &size, const Bool &handles=False, const Bool &drawHandles=False) | |
Constructor. | |
DSSquare (const DSSquare &other) | |
Copy cons. | |
virtual | ~DSSquare () |
Destructor. | |
virtual void | setSize (const Float &size) |
Copy constructor. | |
virtual void | changePoint (const Vector< Float > &pos) |
Change the points, while maintaining the shape as a square. | |
virtual void | changePoint (const Vector< Float > &pos, const Int nPoint) |
Changes the nth point making up the DisplayShape ot the specified location. | |
virtual Bool | setOptions (const Record &settings) |
Get and set options. | |
virtual Record | getOptions () |
Get and set options. |
Implementation of a square.
DSSquare is a method of managing the drawing of a square onto a PixelCanvas.
DSSquare simple extends DSRectangle, and takes much of its functionality from there. It also overrides some functions to ensure that during manipulation of the shape, it remains a square.
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 the drawing of squares onto a pixel canvas
Definition at line 72 of file DSSquare.h.
Default constructor.
casa::DSSquare::DSSquare | ( | const Float & | xPos, |
const Float & | yPos, | ||
const Float & | size, | ||
const Bool & | handles = False , |
||
const Bool & | drawHandles = False |
||
) |
Constructor.
Accepts the centre (xPos, yPos), the size (height/width in pixels), and whether or not it will ever have handles and if so, whether to draw them now.
casa::DSSquare::DSSquare | ( | const DSSquare & | other | ) |
Copy cons.
virtual casa::DSSquare::~DSSquare | ( | ) | [virtual] |
Destructor.
virtual void casa::DSSquare::changePoint | ( | const Vector< Float > & | pos | ) | [virtual] |
Change the points, while maintaining the shape as a square.
Reimplemented from casa::DSRectangle.
virtual void casa::DSSquare::changePoint | ( | const Vector< Float > & | newPoint, |
const Int | nPoint | ||
) | [virtual] |
Changes the nth point making up the DisplayShape ot the specified location.
Reimplemented from casa::DSRectangle.
virtual Record casa::DSSquare::getOptions | ( | ) | [virtual] |
Get and set options.
Reimplemented from casa::DSRectangle.
virtual Bool casa::DSSquare::setOptions | ( | const Record & | settings | ) | [virtual] |
Get and set options.
Reimplemented from casa::DSRectangle.
virtual void casa::DSSquare::setSize | ( | const Float & | size | ) | [virtual] |
Copy constructor.
Set the size of the square in pixels