casa  $Rev:20696$
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Public Member Functions | Static Public Attributes | Protected Member Functions | Protected Attributes
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< StringcoordParameterNames () 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< StringoptionNames () 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< Doublem_x
Vector< Doublem_y
double m_centerX
double m_centerY
Vector< Doublem_screenX
Vector< Doublem_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 312 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.

Record Constructor.

Destructor.


Member Function Documentation

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

Implements RegionShape::coordParameterPositions.

Implements casa::RegionShape.

vector<double> casa::RSPolygon::coordParameterValues ( ) const [virtual]
vector<double> casa::RSPolygon::coordParameterValues ( String  toSystem) 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 ( 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::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::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 355 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) [virtual]
void casa::RSPolygon::setCoordParameters ( const vector< double > &  vals,
String  valSystem 
) [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 349 of file RegionShapes.h.

References casa::String::empty(), and 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 408 of file RegionShapes.h.

double casa::RSPolygon::m_centerY [protected]

Definition at line 408 of file RegionShapes.h.

Definition at line 411 of file RegionShapes.h.

Referenced by type().

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

Definition at line 410 of file RegionShapes.h.

Definition at line 409 of file RegionShapes.h.

Definition at line 409 of file RegionShapes.h.

Definition at line 407 of file RegionShapes.h.

Definition at line 407 of file RegionShapes.h.

Static Members //.

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

Definition at line 318 of file RegionShapes.h.

Definition at line 319 of file RegionShapes.h.


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