casa::RSPolygon Class Reference

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

#include <RegionShapes.h>

Inheritance diagram for casa::RSPolygon:
casa::RegionShape casa::PassiveCachingDD casa::CachingDisplayData casa::DisplayData casa::DisplayOptions casa::DisplayEH casa::DlTarget

List of all members.

Public Member Functions

 RSPolygon (const Vector< double > &x, const Vector< double > &y, MDirection::Types worldSystem, String custName="")
 Non-Static Members //.
 RSPolygon (const Vector< double > &x, const Vector< double > &y, String custName="")
 Pixel Constructor.
 RSPolygon (const RecordInterface &properties)
 Record Constructor.
 ~RSPolygon ()
 Destructor.
void setPolygonCoordinates (const Vector< double > &x, const Vector< double > &y)
 Sets the polygon coordinates to the given.
bool drawAndUpdateBoundingBox (WorldCanvasHolder &wch, String *err=NULL)
 Implements RegionShape::drawAndUpdateBoundingBox.
String type () const
 Implements RegionShape::type.
String oneWordType () const
 Overrides RegionShape::oneWordType.
void getPolygonCoordinates (double &centerX, double &centerY, String toSystem="") const
 Gets polygon-specific coordinates, to avoid dependence on coordParameterValues() when the shape type is known.
void getPolygonCoordinates (vector< double > &x, vector< double > &y, String toSystem="") const
 Gets actual polygon coordinates.
vector< double > coordParameterValues () const
 Implements RegionShape::coordParameterValues.
vector< double > coordParameterValues (String toSystem) const
 Implements RegionShape::coordParameterValues.
vector< String > coordParameterNames () const
 Implements RegionShape::coordParameterNames.
vector< CoordinateParameterTypecoordParameterTypes () 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::optionNames.
vector< OptionTypeoptionTypes () const
 Implements RegionShape::optionTypes.
vector< RSOptionoptionValues () const
 Implements RegionShape::optionValues.
void setOptionValues (const vector< RSOption > &options)
 Implements RegionShape::setOptions.

Static Public Attributes

static const String PROPXCOORDINATES
 Static Members //.
static const String PROPYCOORDINATES

Protected Member Functions

void getShapeSpecificProperties (Record &properties) const
 Implements RegionShape::getShapeSpecificProperties.
void setShapeSpecificProperties (const RecordInterface &properties)
 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

Vector< Double > m_x
Vector< Double > m_y
double m_centerX
double m_centerY
Vector< Double > m_screenX
Vector< Double > m_screenY
unsigned int m_n
String m_custName

Detailed Description

Subclass of RegionShape used for drawing polygons.

A polygon has the following properties in addition to those listed for RegionShape:

The following properties are also available:

Definition at line 329 of file RegionShapes.h.


Constructor & Destructor Documentation

casa::RSPolygon::RSPolygon ( const Vector< double > &  x,
const Vector< double > &  y,
MDirection::Types  worldSystem,
String  custName = "" 
)

Non-Static Members //.

World Constructor. x and y must both be 1) using the same world system as defined by worldSystem, and 2) in unit RegionShape::UNIT. A custom name can be provided to be returned with RSPolygon::type().

casa::RSPolygon::RSPolygon ( const Vector< double > &  x,
const Vector< double > &  y,
String  custName = "" 
)

Pixel Constructor.

casa::RSPolygon::RSPolygon ( const RecordInterface &  properties  ) 

Record Constructor.

casa::RSPolygon::~RSPolygon (  ) 

Destructor.


Member Function Documentation

vector<String> casa::RSPolygon::coordParameterNames (  )  const [virtual]
vector<CoordinateParameterType> casa::RSPolygon::coordParameterTypes (  )  const [virtual]

Implements RegionShape::coordParameterPositions.

Implements casa::RegionShape.

vector<double> casa::RSPolygon::coordParameterValues ( String  toSystem  )  const [virtual]
vector<double> casa::RSPolygon::coordParameterValues (  )  const [virtual]
bool casa::RSPolygon::drawAndUpdateBoundingBox ( WorldCanvasHolder wch,
String *  err = NULL 
) [virtual]
RSHandle casa::RSPolygon::getHandle (  )  const [virtual]

Implements RegionShape::getHandle.

Implements casa::RegionShape.

void casa::RSPolygon::getPolygonCoordinates ( vector< double > &  x,
vector< double > &  y,
String  toSystem = "" 
) const

Gets actual polygon coordinates.

If toSystem is empty, no conversion is done; otherwise see the constraints listed in RegionShape::coordParameterValues(String).

void casa::RSPolygon::getPolygonCoordinates ( double &  centerX,
double &  centerY,
String  toSystem = "" 
) const

Gets polygon-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 casa::RSPolygon::getShapeSpecificProperties ( Record &  properties  )  const [protected, virtual]
void casa::RSPolygon::move ( double  dx,
double  dy,
String  system = "" 
) [virtual]

Implements RegionShape::move.

Implements casa::RegionShape.

String casa::RSPolygon::oneWordType (  )  const [inline, virtual]

Overrides RegionShape::oneWordType.

Reimplemented from casa::RegionShape.

Definition at line 372 of file RegionShapes.h.

vector<String> casa::RSPolygon::optionNames (  )  const [virtual]
vector<OptionType> casa::RSPolygon::optionTypes (  )  const [virtual]
vector<RSOption> casa::RSPolygon::optionValues (  )  const [virtual]
void casa::RSPolygon::setCoordParameters ( const vector< double > &  vals,
String  valSystem 
) [virtual]
void casa::RSPolygon::setCoordParameters ( const vector< double > &  vals  )  [virtual]
void casa::RSPolygon::setOptionValues ( const vector< RSOption > &  options  )  [virtual]

Implements RegionShape::setOptions.

Implements casa::RegionShape.

void casa::RSPolygon::setPolygonCoordinates ( const Vector< double > &  x,
const Vector< double > &  y 
)

Sets the polygon coordinates to the given.

void casa::RSPolygon::setShapeSpecificProperties ( const RecordInterface &  properties  )  [protected, virtual]
String casa::RSPolygon::type (  )  const [inline, virtual]

Implements RegionShape::type.

Implements casa::RegionShape.

Definition at line 366 of file RegionShapes.h.

References m_custName.

void casa::RSPolygon::updateMinMax (  )  [protected]

Update m_xMin, m_xMax, m_yMin, and m_yMax.

bool casa::RSPolygon::updateScreenCoordinates ( WorldCanvasHolder wch,
String *  err 
) [protected]

Updates screen coords using world/pixel coords and the given WorldCanvas.


Member Data Documentation

double casa::RSPolygon::m_centerX [protected]

Definition at line 427 of file RegionShapes.h.

double casa::RSPolygon::m_centerY [protected]

Definition at line 427 of file RegionShapes.h.

String casa::RSPolygon::m_custName [protected]

Definition at line 430 of file RegionShapes.h.

Referenced by type().

unsigned int casa::RSPolygon::m_n [protected]

Definition at line 429 of file RegionShapes.h.

Vector<Double> casa::RSPolygon::m_screenX [protected]

Definition at line 428 of file RegionShapes.h.

Vector<Double> casa::RSPolygon::m_screenY [protected]

Definition at line 428 of file RegionShapes.h.

Vector<Double> casa::RSPolygon::m_x [protected]

Definition at line 426 of file RegionShapes.h.

Vector<Double> casa::RSPolygon::m_y [protected]

Definition at line 426 of file RegionShapes.h.

const String casa::RSPolygon::PROPXCOORDINATES [static]

Static Members //.

Properties. (See class descriptions of RegionShape and RSPolygon.)

Definition at line 335 of file RegionShapes.h.

const String casa::RSPolygon::PROPYCOORDINATES [static]

Definition at line 336 of file RegionShapes.h.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated on 31 Aug 2016 for casa by  doxygen 1.6.1