casa  5.7.0-16
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
RSText Class Reference

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

#include <RegionShapes.h>

Inheritance diagram for RSText:

Public Member Functions

 RSText (double x, double y, const casacore::String &text, casacore::MDirection::Types worldSys, double angle=0)
 World Constructor. More...
 
 RSText (double x, double y, const casacore::String &text, double angle=0)
 Pixel Constructor. More...
 
 RSText (const casacore::RecordInterface &properties)
 casacore::Record Constructor. More...
 
 ~RSText ()
 Destructor. More...
 
bool drawAndUpdateBoundingBox (WorldCanvasHolder &wch, casacore::String *err=NULL)
 Implements RegionShape::drawAndUpdateBoundingBox. More...
 
casacore::String type () const
 Implements RegionShape::type. More...
 
void getTextCoordinates (double &x, double &y, double &angle, casacore::String toSystem="") const
 Gets text-specific coordinates, to avoid dependence on coordParameterValues() when the shape type is known. More...
 
std::vector< double > coordParameterValues () const
 Implements RegionShape::coordParameterValues. More...
 
std::vector< double > coordParameterValues (casacore::String toSystem) const
 Implements RegionShape::coordParameterValues. More...
 
std::vector< casacore::StringcoordParameterNames () const
 Implements RegionShape::coordParameterNames. More...
 
std::vector
< CoordinateParameterType > 
coordParameterTypes () const
 Implements RegionShape::coordParameterPositions. More...
 
void setCoordParameters (const std::vector< double > &vals)
 Implements RegionShape::setCoordParameters. More...
 
void setCoordParameters (const std::vector< double > &vals, casacore::String valSystem)
 Implements RegionShape::setCoordParameters. More...
 
void move (double dx, double dy, casacore::String system="")
 Implements RegionShape::move. More...
 
RSHandle getHandle () const
 Implements RegionShape::getHandle. More...
 
std::vector< casacore::StringoptionNames () const
 Implements RegionShape option methods. More...
 
std::vector< OptionType > optionTypes () const
 
std::vector< RSOption > optionValues () const
 
void setOptionValues (const vector< RSOption > &)
 

Protected Member Functions

void getShapeSpecificProperties (casacore::Record &properties) const
 Implements RegionShape::getShapeSpecificProperties. More...
 
void setShapeSpecificProperties (const casacore::RecordInterface &)
 Implements RegionShape::setShapeSpecificProperties. More...
 
bool updateScreenCoordinates (WorldCanvasHolder &wch, casacore::String *err)
 Updates screen coords using world/pixel coords and the given WorldCanvas. More...
 
void updateMinMax ()
 Update m_xMin, m_xMax, m_yMin, and m_yMax. More...
 

Protected Attributes

double m_x
 
double m_y
 
double m_angle
 
double m_wWidth
 
double m_screenX
 updated during updateScreenCoordinates More...
 
double m_screenY
 

Detailed Description

Subclass of RegionShape used for drawing text.

Text uses RegionShape's label property.

Definition at line 923 of file RegionShapes.h.

Constructor & Destructor Documentation

RSText::RSText ( double  x,
double  y,
const casacore::String text,
casacore::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 casacore::String text,
double  angle = 0 
)

Pixel Constructor.

Angle is counterclockwise.

RSText::RSText ( const casacore::RecordInterface properties)

casacore::Record Constructor.

RSText::~RSText ( )

Destructor.

Member Function Documentation

std::vector<casacore::String> RSText::coordParameterNames ( ) const

Implements RegionShape::coordParameterNames.

std::vector<CoordinateParameterType> RSText::coordParameterTypes ( ) const

Implements RegionShape::coordParameterPositions.

std::vector<double> RSText::coordParameterValues ( ) const

Implements RegionShape::coordParameterValues.

std::vector<double> RSText::coordParameterValues ( casacore::String  toSystem) const

Implements RegionShape::coordParameterValues.

bool RSText::drawAndUpdateBoundingBox ( WorldCanvasHolder &  wch,
casacore::String err = NULL 
)

Implements RegionShape::drawAndUpdateBoundingBox.

RSHandle RSText::getHandle ( ) const

Implements RegionShape::getHandle.

void RSText::getShapeSpecificProperties ( casacore::Record properties) const
inlineprotected

Implements RegionShape::getShapeSpecificProperties.

Definition at line 1002 of file RegionShapes.h.

References casacore::RecordInterface::define().

void RSText::getTextCoordinates ( double &  x,
double &  y,
double &  angle,
casacore::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(casacore::String).

void RSText::move ( double  dx,
double  dy,
casacore::String  system = "" 
)

Implements RegionShape::move.

std::vector<casacore::String> RSText::optionNames ( ) const
inline

Implements RegionShape option methods.

Note: text do not have additonal options.

Definition at line 982 of file RegionShapes.h.

std::vector<OptionType> RSText::optionTypes ( ) const
inline

Definition at line 985 of file RegionShapes.h.

std::vector<RSOption> RSText::optionValues ( ) const
inline

Definition at line 988 of file RegionShapes.h.

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

Implements RegionShape::setCoordParameters.

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

Implements RegionShape::setCoordParameters.

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

Definition at line 991 of file RegionShapes.h.

void RSText::setShapeSpecificProperties ( const casacore::RecordInterface )
inlineprotected

Implements RegionShape::setShapeSpecificProperties.

Definition at line 1007 of file RegionShapes.h.

casacore::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,
casacore::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 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.


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