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

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

#include <RegionShapes.h>

List of all members.

Public Member Functions

 RSMarker (double x, double y, Display::Marker marker, int pixelHeight, MDirection::Types worldSystem)
 World Constructor for a single marker type.
 RSMarker (double x, double y, const vector< Display::Marker > &markers, int pixelHeight, MDirection::Types worldSystem)
 World Constructor for a compound marker type.
 RSMarker (double x, double y, Display::Marker marker, int pixelHeight)
 Pixel Constructor for a single marker type.
 RSMarker (double x, double y, const vector< Display::Marker > &markers, int pixelHeight)
 Pixel Constructor for a compound marker type.
 RSMarker (const RecordInterface &properties)
 Record Constructor.
 ~RSMarker ()
 Destructor.
vector< Display::Marker > markers () const
 Gets/sets the markers used for this shape.
void setMarker (Display::Marker marker)
void setMarkers (const vector< Display::Marker > &markers)
bool drawAndUpdateBoundingBox (WorldCanvasHolder &wch, String *err=NULL)
 Implements RegionShape::drawAndUpdateBoundingBox.
String type () const
 Implements RegionShape::type.
String oneWordType () const
 Overrides RegionShape::oneWordType.
void getMarkerCoordinates (double &x, double &y, int &pixelHeight, String toSystem="") const
 Gets marker-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::optionNames.
vector< OptionType > optionTypes () const
 Implements RegionShape::optionTypes.
vector< vector< String > > optionChoices () const
 Overrides RegionShape::optionChoices.
vector< RSOption > optionValues () const
 Implements RegionShape::optionValues.
void setOptionValues (const vector< RSOption > &options)
 Implements RegionShape::setOptions.

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.

Static Protected Member Functions

static String markerToString (Display::Marker marker)
static bool stringToMarker (const String &str, Display::Marker &marker)
static vector< Display::Marker > allMarkers ()

Protected Attributes

double m_x
double m_y
double m_screenX
double m_screenY
vector< Display::Marker > m_markers
int m_pixelHeight

Detailed Description

Subclass of RegionShape used for drawing markers.

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

Definition at line 686 of file RegionShapes.h.


Constructor & Destructor Documentation

RSMarker::RSMarker ( double  x,
double  y,
Display::Marker  marker,
int  pixelHeight,
MDirection::Types  worldSystem 
)

World Constructor for a single marker type.

x and y must all be 1) using the same world system as defined by worldSystem, and 2) in the unit RegionShape::UNIT. pixelHeight is in screen pixels.

RSMarker::RSMarker ( double  x,
double  y,
const vector< Display::Marker > &  markers,
int  pixelHeight,
MDirection::Types  worldSystem 
)

World Constructor for a compound marker type.

x and y must all be 1) using the same world system as defined by worldSystem, and 2) in the unit RegionShape::UNIT. pixelHeight is in screen pixels.

RSMarker::RSMarker ( double  x,
double  y,
Display::Marker  marker,
int  pixelHeight 
)

Pixel Constructor for a single marker type.

pixelHeight is in screen pixels.

RSMarker::RSMarker ( double  x,
double  y,
const vector< Display::Marker > &  markers,
int  pixelHeight 
)

Pixel Constructor for a compound marker type.

pixelHeight is in screen pixels.

RSMarker::RSMarker ( const RecordInterface &  properties)

Record Constructor.

Destructor.


Member Function Documentation

static vector<Display::Marker> RSMarker::allMarkers ( ) [inline, static, protected]

Implements RegionShape::coordParameterNames.

vector<CoordinateParameterType> RSMarker::coordParameterTypes ( ) const

Implements RegionShape::coordParameterPositions.

vector<double> RSMarker::coordParameterValues ( ) const

Implements RegionShape::coordParameterValues.

vector<double> RSMarker::coordParameterValues ( String  toSystem) const

Implements RegionShape::coordParameterValues.

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

Implements RegionShape::drawAndUpdateBoundingBox.

RSHandle RSMarker::getHandle ( ) const

Implements RegionShape::getHandle.

void RSMarker::getMarkerCoordinates ( double &  x,
double &  y,
int &  pixelHeight,
String  toSystem = "" 
) const

Gets marker-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 RSMarker::getShapeSpecificProperties ( Record &  properties) const [inline, protected]

Implements RegionShape::getShapeSpecificProperties.

Definition at line 785 of file RegionShapes.h.

vector<Display::Marker> RSMarker::markers ( ) const

Gets/sets the markers used for this shape.

static String RSMarker::markerToString ( Display::Marker  marker) [inline, static, protected]
void RSMarker::move ( double  dx,
double  dy,
String  system = "" 
)

Implements RegionShape::move.

String RSMarker::oneWordType ( ) const [inline]

Overrides RegionShape::oneWordType.

Definition at line 730 of file RegionShapes.h.

vector<vector<String> > RSMarker::optionChoices ( ) const

Overrides RegionShape::optionChoices.

vector<String> RSMarker::optionNames ( ) const

Implements RegionShape::optionNames.

vector<OptionType> RSMarker::optionTypes ( ) const

Implements RegionShape::optionTypes.

vector<RSOption> RSMarker::optionValues ( ) const

Implements RegionShape::optionValues.

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

Implements RegionShape::setCoordParameters.

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

Implements RegionShape::setCoordParameters.

void RSMarker::setMarker ( Display::Marker  marker)
void RSMarker::setMarkers ( const vector< Display::Marker > &  markers)
void RSMarker::setOptionValues ( const vector< RSOption > &  options)

Implements RegionShape::setOptions.

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

Implements RegionShape::setShapeSpecificProperties.

Definition at line 790 of file RegionShapes.h.

static bool RSMarker::stringToMarker ( const String str,
Display::Marker &  marker 
) [inline, static, protected]

Implements RegionShape::type.

void RSMarker::updateMinMax ( ) [protected]

Update m_xMin, m_xMax, m_yMin, and m_yMax.

bool RSMarker::updateScreenCoordinates ( WorldCanvasHolder &  wch,
String err 
) [protected]

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


Member Data Documentation

vector<Display::Marker> RSMarker::m_markers [protected]

Definition at line 781 of file RegionShapes.h.

int RSMarker::m_pixelHeight [protected]

Definition at line 782 of file RegionShapes.h.

double RSMarker::m_screenX [protected]

Definition at line 780 of file RegionShapes.h.

double RSMarker::m_screenY [protected]

Definition at line 780 of file RegionShapes.h.

double RSMarker::m_x [protected]

Definition at line 779 of file RegionShapes.h.

double RSMarker::m_y [protected]

Definition at line 779 of file RegionShapes.h.


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