casa  $Rev:20696$
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Public Member Functions | Protected Member Functions | Protected Attributes
RSText Class Reference

Subclass of RegionShape used for drawing text. More...

#include <RegionShapes.h>

List of all members.

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< StringcoordParameterNames () 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< StringoptionNames () 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

Detailed Description

Subclass of RegionShape used for drawing text.

Text uses RegionShape's label property.

Definition at line 862 of file RegionShapes.h.


Constructor & Destructor Documentation

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.

Destructor.


Member Function Documentation

Implements RegionShape::coordParameterNames.

vector<CoordinateParameterType> RSText::coordParameterTypes ( ) const

Implements RegionShape::coordParameterPositions.

vector<double> RSText::coordParameterValues ( ) const

Implements RegionShape::coordParameterValues.

vector<double> RSText::coordParameterValues ( String  toSystem) 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 933 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 919 of file RegionShapes.h.

vector<OptionType> RSText::optionTypes ( ) const [inline]

Definition at line 920 of file RegionShapes.h.

vector<RSOption> RSText::optionValues ( ) const [inline]

Definition at line 921 of file RegionShapes.h.

void RSText::setCoordParameters ( const vector< double > &  vals)

Implements RegionShape::setCoordParameters.

void RSText::setCoordParameters ( const vector< double > &  vals,
String  valSystem 
)

Implements RegionShape::setCoordParameters.

void RSText::setOptionValues ( const vector< RSOption > &  ) [inline]

Definition at line 922 of file RegionShapes.h.

void RSText::setShapeSpecificProperties ( const RecordInterface &  ) [inline, protected]

Implements RegionShape::setShapeSpecificProperties.

Definition at line 938 of file RegionShapes.h.

String RSText::type ( ) const [inline]

Implements RegionShape::type.

Definition at line 883 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.


Member Data Documentation

double RSText::m_angle [protected]

Definition at line 927 of file RegionShapes.h.

double RSText::m_screenX [protected]

updated during updateScreenCoordinates

Definition at line 930 of file RegionShapes.h.

double RSText::m_screenY [protected]

Definition at line 930 of file RegionShapes.h.

double RSText::m_wWidth [protected]

Definition at line 928 of file RegionShapes.h.

double RSText::m_x [protected]

     

Definition at line 926 of file RegionShapes.h.

double RSText::m_y [protected]

Definition at line 926 of file RegionShapes.h.


The documentation for this class was generated from the following file: