Subclass of RegionShape used for drawing text. More...
#include <RegionShapes.h>
Public Member Functions | |
| RSText (double x, double y, const String &text, MDirection::Types worldSys, double angle=0) | |
| World Constructor. | |
| RSText (double x, double y, const String &text, double angle=0) | |
| Pixel Constructor. | |
| RSText (const RecordInterface &properties) | |
| Record Constructor. | |
| ~RSText () | |
| Destructor. | |
| bool | drawAndUpdateBoundingBox (WorldCanvasHolder &wch, String *err=NULL) |
| Implements RegionShape::drawAndUpdateBoundingBox. | |
| String | type () const |
| Implements RegionShape::type. | |
| void | getTextCoordinates (double &x, double &y, double &angle, String toSystem="") const |
| Gets text-specific coordinates, to avoid dependence on coordParameterValues() when the shape type is known. | |
| vector< double > | coordParameterValues () const |
| Implements RegionShape::coordParameterValues. | |
| vector< double > | coordParameterValues (String toSystem) const |
| Implements RegionShape::coordParameterValues. | |
| vector< String > | coordParameterNames () const |
| Implements RegionShape::coordParameterNames. | |
| vector< CoordinateParameterType > | coordParameterTypes () const |
| Implements RegionShape::coordParameterPositions. | |
| void | setCoordParameters (const vector< double > &vals) |
| Implements RegionShape::setCoordParameters. | |
| void | setCoordParameters (const vector< double > &vals, String valSystem) |
| Implements RegionShape::setCoordParameters. | |
| void | move (double dx, double dy, String system="") |
| Implements RegionShape::move. | |
| RSHandle | getHandle () const |
| Implements RegionShape::getHandle. | |
| vector< String > | optionNames () const |
| Implements RegionShape option methods. | |
| vector< OptionType > | optionTypes () const |
| vector< RSOption > | optionValues () const |
| void | setOptionValues (const vector< RSOption > &) |
Protected Member Functions | |
| void | getShapeSpecificProperties (Record &properties) const |
| Implements RegionShape::getShapeSpecificProperties. | |
| void | setShapeSpecificProperties (const RecordInterface &) |
| Implements RegionShape::setShapeSpecificProperties. | |
| bool | updateScreenCoordinates (WorldCanvasHolder &wch, String *err) |
| Updates screen coords using world/pixel coords and the given WorldCanvas. | |
| void | updateMinMax () |
| Update m_xMin, m_xMax, m_yMin, and m_yMax. | |
Protected Attributes | |
| double | m_x |
| double | m_y |
| double | m_angle |
| double | m_wWidth |
| double | m_screenX |
| updated during updateScreenCoordinates | |
| double | m_screenY |
Subclass of RegionShape used for drawing text.
Text uses RegionShape's label property.
Definition at line 923 of file RegionShapes.h.
| RSText::RSText | ( | double | x, | |
| double | y, | |||
| const String & | text, | |||
| MDirection::Types | worldSys, | |||
| double | angle = 0 | |||
| ) |
World Constructor.
x, y, and angle must both be 1) using the same world system as defined by worldSystem, and 2) in unit RegionShape::UNIT. Angle is counterclockwise, and the base is the east vector.
| RSText::RSText | ( | double | x, | |
| double | y, | |||
| const String & | text, | |||
| double | angle = 0 | |||
| ) |
Pixel Constructor.
Angle is counterclockwise.
| RSText::RSText | ( | const RecordInterface & | properties | ) |
Record Constructor.
| RSText::~RSText | ( | ) |
Destructor.
| vector<String> RSText::coordParameterNames | ( | ) | const |
Implements RegionShape::coordParameterNames.
| vector<CoordinateParameterType> RSText::coordParameterTypes | ( | ) | const |
Implements RegionShape::coordParameterPositions.
| vector<double> RSText::coordParameterValues | ( | String | toSystem | ) | const |
Implements RegionShape::coordParameterValues.
| vector<double> RSText::coordParameterValues | ( | ) | const |
Implements RegionShape::coordParameterValues.
| bool RSText::drawAndUpdateBoundingBox | ( | WorldCanvasHolder & | wch, | |
| String * | err = NULL | |||
| ) |
Implements RegionShape::drawAndUpdateBoundingBox.
| RSHandle RSText::getHandle | ( | ) | const |
Implements RegionShape::getHandle.
| void RSText::getShapeSpecificProperties | ( | Record & | properties | ) | const [inline, protected] |
Implements RegionShape::getShapeSpecificProperties.
Definition at line 1002 of file RegionShapes.h.
| void RSText::getTextCoordinates | ( | double & | x, | |
| double & | y, | |||
| double & | angle, | |||
| String | toSystem = "" | |||
| ) | const |
Gets text-specific coordinates, to avoid dependence on coordParameterValues() when the shape type is known.
If toSystem is empty, no conversion is done; otherwise see the constraints listed in RegionShape::coordParameterValues(String).
| void RSText::move | ( | double | dx, | |
| double | dy, | |||
| String | system = "" | |||
| ) |
Implements RegionShape::move.
| vector<String> RSText::optionNames | ( | ) | const [inline] |
Implements RegionShape option methods.
Note: text do not have additonal options.
Definition at line 982 of file RegionShapes.h.
| vector<OptionType> RSText::optionTypes | ( | ) | const [inline] |
Definition at line 985 of file RegionShapes.h.
| vector<RSOption> RSText::optionValues | ( | ) | const [inline] |
Definition at line 988 of file RegionShapes.h.
| void RSText::setCoordParameters | ( | const vector< double > & | vals, | |
| String | valSystem | |||
| ) |
Implements RegionShape::setCoordParameters.
| void RSText::setCoordParameters | ( | const vector< double > & | vals | ) |
Implements RegionShape::setCoordParameters.
| void RSText::setOptionValues | ( | const vector< RSOption > & | ) | [inline] |
Definition at line 991 of file RegionShapes.h.
| void RSText::setShapeSpecificProperties | ( | const RecordInterface & | ) | [inline, protected] |
Implements RegionShape::setShapeSpecificProperties.
Definition at line 1007 of file RegionShapes.h.
| String RSText::type | ( | ) | const [inline] |
Implements RegionShape::type.
Definition at line 944 of file RegionShapes.h.
| void RSText::updateMinMax | ( | ) | [protected] |
Update m_xMin, m_xMax, m_yMin, and m_yMax.
Note that this is only valid the screen coordinates have been updated.
| bool RSText::updateScreenCoordinates | ( | WorldCanvasHolder & | wch, | |
| String * | err | |||
| ) | [protected] |
Updates screen coords using world/pixel coords and the given WorldCanvas.
double RSText::m_angle [protected] |
Definition at line 996 of file RegionShapes.h.
double RSText::m_screenX [protected] |
updated during updateScreenCoordinates
Definition at line 999 of file RegionShapes.h.
double RSText::m_screenY [protected] |
Definition at line 999 of file RegionShapes.h.
double RSText::m_wWidth [protected] |
Definition at line 997 of file RegionShapes.h.
double RSText::m_x [protected] |
Definition at line 995 of file RegionShapes.h.
double RSText::m_y [protected] |
Definition at line 995 of file RegionShapes.h.
1.6.1