casa  5.7.0-16
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Classes | Namespaces | Functions | Variables
RegionShapes.h File Reference
#include <display/RegionShapes/RegionShape.h>
#include <cctype>
#include <casa/namespace.h>

Go to the source code of this file.

Classes

class  casa::RSEllipse
 Subclass of RegionShape used for drawing ellipses. More...
 
class  casa::RSCircle
 Subclass of RSEllipse used for drawing circles. More...
 
class  casa::RSRectangle
 Subclass of RegionShape used for drawing rectangles. More...
 
class  casa::RSPolygon
 Subclass of RegionShape used for drawing polygons. More...
 
class  casa::RSLine
 Subclass of RegionShape used for drawing lines. More...
 
class  RSVector
 Subclass of RSLine that takes a length and angle instead of a second point. More...
 
class  RSMarker
 Subclass of RegionShape used for drawing markers. More...
 
class  RSText
 Subclass of RegionShape used for drawing text. More...
 
class  RSComposite
 Subclass of RegionShape used for drawing composite regions. More...
 

Namespaces

 casa
 -*- mode: c++ -*-
 

Functions

bool casa::p1Arrow () const
 
bool casa::p2Arrow () const
 
virtual bool drawAndUpdateBoundingBox (WorldCanvasHolder &wch, casacore::String *error=NULL)
 Implements RegionShape::drawAndUpdateBoundingBox. More...
 
virtual casacore::String type () const
 Implements RegionShape::type. More...
 
void getLineCoordinates (double &x1, double &y1, double &x2, double &y2, int &arrowLength, casacore::String toSystem="") const
 Gets line-specific coordinates, to avoid dependence on coordParameterValues() when the shape type is known. More...
 
virtual std::vector< double > coordParameterValues () const
 Implements RegionShape::coordParameterVales. More...
 
std::vector< double > coordParameterValues (casacore::String toSystem) const
 Implements RegionShape::coordParameterValues. More...
 
virtual std::vector
< casacore::String
coordParameterNames () const
 Implements RegionShape::coordParameterNames. More...
 
virtual std::vector
< CoordinateParameterType > 
coordParameterTypes () const
 Implements RegionShape::coordParameterPositions. More...
 
virtual void setCoordParameters (const std::vector< double > &vals)
 Implements RegionShape::setCoordParameters. More...
 
virtual void setCoordParameters (const std::vector< double > &vals, casacore::String System)
 Implements RegionShape::setCoordParameters. More...
 
virtual void move (double dx, double dy, casacore::String system="")
 Implements RegionShape::move. More...
 
virtual RSHandle getHandle () const
 Implements RegionShape::getHandle. More...
 
virtual std::vector
< casacore::String
optionNames () const
 Implements RegionShape::optionNames. More...
 
virtual std::vector< OptionType > optionTypes () const
 Implements RegionShape::optionTypes. More...
 
virtual std::vector
< std::vector
< casacore::String > > 
optionChoices () const
 Implements RegionShape::optionChoices. More...
 
virtual std::vector< RSOption > optionValues () const
 Implements RegionShape::optionValues. More...
 
virtual void setOptionValues (const std::vector< RSOption > &options)
 Implements RegionShape::setOptions. More...
 
virtual void getShapeSpecificProperties (casacore::Record &properties) const
 Implements RegionShape::getShapeSpecificProperties. More...
 
virtual void setShapeSpecificProperties (const casacore::RecordInterface &)
 Implements RegionShape::setShapeSpecificProperties. More...
 
virtual 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...
 
static bool arrowPoints (double x1, double y1, double x2, double y2, double length, double &resX1, double &resY1, double &resX2, double &resY2)
 Generates arrow points based on the given (x1, y1) (x2, y2) points. More...
 
static bool arrowPointsHelper (double x1, double y1, double x2, double y2, double length, double &resX1, double &resY1, double &resX2, double &resY2)
 Helper for arrowPoints. More...
 

Variables

vector< double > m_spec
 
vector< double > m_screenSpec
 
int m_arrowLength
 
bool m_arrow1
 
bool m_arrow2
 
ArrowType m_aType1
 
ArrowType m_aType2
 

Function Documentation

static bool arrowPoints ( double  x1,
double  y1,
double  x2,
double  y2,
double  length,
double &  resX1,
double &  resY1,
double &  resX2,
double &  resY2 
)
staticprotected

Generates arrow points based on the given (x1, y1) (x2, y2) points.

NOTE: Duplicated code from casaqt/QwtPlotter/QPShape (QPArrow class).

static bool arrowPointsHelper ( double  x1,
double  y1,
double  x2,
double  y2,
double  length,
double &  resX1,
double &  resY1,
double &  resX2,
double &  resY2 
)
staticprotected

Helper for arrowPoints.

NOTE: Duplicated code.

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

Implements RegionShape::coordParameterNames.

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

Implements RegionShape::coordParameterPositions.

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

Implements RegionShape::coordParameterVales.

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

Implements RegionShape::coordParameterValues.

virtual bool drawAndUpdateBoundingBox ( WorldCanvasHolder &  wch,
casacore::String error = NULL 
)
virtual

Implements RegionShape::drawAndUpdateBoundingBox.

virtual RSHandle getHandle ( ) const
virtual

Implements RegionShape::getHandle.

void getLineCoordinates ( double &  x1,
double &  y1,
double &  x2,
double &  y2,
int &  arrowLength,
casacore::String  toSystem = "" 
) const

Gets line-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).

virtual void getShapeSpecificProperties ( casacore::Record properties) const
protectedvirtual

Implements RegionShape::getShapeSpecificProperties.

Definition at line 606 of file RegionShapes.h.

References casacore::RecordInterface::define(), casa::RegionShape::PROPTYPE, and casa::RegionShape::PROPTYPE_LINE.

virtual void move ( double  dx,
double  dy,
casacore::String  system = "" 
)
virtual
virtual std::vector<std::vector<casacore::String> > optionChoices ( ) const
virtual

Implements RegionShape::optionChoices.

virtual std::vector<casacore::String> optionNames ( ) const
virtual

Implements RegionShape::optionNames.

virtual std::vector<OptionType> optionTypes ( ) const
virtual

Implements RegionShape::optionTypes.

virtual std::vector<RSOption> optionValues ( ) const
virtual

Implements RegionShape::optionValues.

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

Implements RegionShape::setCoordParameters.

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

Implements RegionShape::setCoordParameters.

virtual void setOptionValues ( const std::vector< RSOption > &  options)
virtual

Implements RegionShape::setOptions.

virtual void setShapeSpecificProperties ( const casacore::RecordInterface )
protectedvirtual

Implements RegionShape::setShapeSpecificProperties.

Definition at line 611 of file RegionShapes.h.

virtual casacore::String type ( ) const
virtual
void updateMinMax ( )
protected

Update m_xMin, m_xMax, m_yMin, and m_yMax.

virtual bool updateScreenCoordinates ( WorldCanvasHolder &  wch,
casacore::String err 
)
protectedvirtual

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

Variable Documentation

bool m_arrow1

Definition at line 602 of file RegionShapes.h.

Referenced by casa::p1Arrow().

bool m_arrow2

Definition at line 602 of file RegionShapes.h.

Referenced by casa::p2Arrow().

int m_arrowLength

Definition at line 601 of file RegionShapes.h.

ArrowType m_aType1

Definition at line 603 of file RegionShapes.h.

ArrowType m_aType2

Definition at line 603 of file RegionShapes.h.

vector<double> m_screenSpec

Definition at line 600 of file RegionShapes.h.

vector<double> m_spec

Definition at line 599 of file RegionShapes.h.