casa  5.7.0-16
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | List of all members
casa::PlotShape Class Referenceabstract

Abstract class for any shape which contains common functionality. More...

#include <PlotShape.h>

Inheritance diagram for casa::PlotShape:
casa::PlotItem casa::PlotShapeArc casa::PlotShapeArrow casa::PlotShapeEllipse casa::PlotShapeLine casa::PlotShapePath casa::PlotShapePolygon casa::PlotShapeRectangle

Public Member Functions

 PlotShape ()
 Constructor. More...
 
virtual ~PlotShape ()
 Destructor. More...
 
virtual unsigned int drawCount () const
 Implements PlotItem::drawCount(). More...
 
virtual std::vector
< PlotCoordinate > 
coordinates () const =0
 ABSTRACT METHODS //. More...
 
virtual void setCoordinates (const std::vector< PlotCoordinate > &c)=0
 Sets this shape's coordinates to the given. More...
 
virtual bool lineShown () const =0
 Returns true if a line is shown for this shape, false otherwise. More...
 
virtual void setLineShown (bool line=true)=0
 Sets whether a line is shown for this shape or not. More...
 
virtual PlotLinePtr line () const =0
 Returns a copy of the line used for this shape. More...
 
virtual void setLine (const PlotLine &line)=0
 Sets this shape's line to the given. More...
 
virtual bool areaFilled () const =0
 Returns true if this shape has an area fill, false otherwise. More...
 
virtual void setAreaFilled (bool area=true)=0
 Sets whether or not this shape has an area fill. More...
 
virtual PlotAreaFillPtr areaFill () const =0
 Returns a copy of the area fill for this shape. More...
 
virtual void setAreaFill (const PlotAreaFill &fill)=0
 Sets this shape's area fill to the given. More...
 
virtual void setLine (const PlotLinePtr l)
 IMPLEMENTED METHODS //. More...
 
virtual void setLine (const casacore::String &color, PlotLine::Style style=PlotLine::SOLID, double width=1.0)
 
virtual void setAreaFill (const PlotAreaFillPtr f)
 Convenience methods for setting the area fill. More...
 
virtual void setAreaFill (const casacore::String &color, PlotAreaFill::Pattern pattern=PlotAreaFill::FILL)
 
- Public Member Functions inherited from casa::PlotItem
 PlotItem ()
 Constructor. More...
 
virtual ~PlotItem ()
 Destructor. More...
 
virtual PlotCanvascanvas () const =0
 Returns the canvas this item is currently attached to, or NULL for none. More...
 
virtual casacore::String title () const =0
 Returns a human-readable title for identification. More...
 
virtual void setTitle (const casacore::String &newTitle)=0
 Sets this items's title to the given. More...
 
virtual bool isValid () const =0
 Returns true if this item is valid, false otherwise. More...
 
virtual bool isQWidget () const =0
 Returns whether this item can be directly casted to a QWidget or not. More...
 
virtual PlotAxis xAxis () const =0
 Returns the item's axes. More...
 
virtual PlotAxis yAxis () const =0
 
virtual void setXAxis (PlotAxis x)=0
 Sets the item's axes. More...
 
virtual void setYAxis (PlotAxis y)=0
 
virtual void setAxes (PlotAxis x, PlotAxis y)
 Sets both the item's axes at once. More...
 
virtual unsigned int drawSegments (unsigned int segmentThreshold) const
 Returns the number of draw segments for this item, using the given segment threshold. More...
 

Detailed Description

Abstract class for any shape which contains common functionality.

Definition at line 37 of file PlotShape.h.

Constructor & Destructor Documentation

casa::PlotShape::PlotShape ( )
inline

Constructor.

Definition at line 40 of file PlotShape.h.

virtual casa::PlotShape::~PlotShape ( )
inlinevirtual

Destructor.

Definition at line 43 of file PlotShape.h.

Member Function Documentation

virtual PlotAreaFillPtr casa::PlotShape::areaFill ( ) const
pure virtual

Returns a copy of the area fill for this shape.

Referenced by setAreaFill().

virtual bool casa::PlotShape::areaFilled ( ) const
pure virtual

Returns true if this shape has an area fill, false otherwise.

virtual std::vector<PlotCoordinate> casa::PlotShape::coordinates ( ) const
pure virtual

ABSTRACT METHODS //.

Returns the coordinates for this shape. The number and order depends on the specific shape subclass.

Referenced by casa::PlotShapePolygon::drawCount(), and casa::PlotShapePath::drawCount().

virtual unsigned int casa::PlotShape::drawCount ( ) const
inlinevirtual

Implements PlotItem::drawCount().

Provides default implementation that returns 1.

Implements casa::PlotItem.

Reimplemented in casa::PlotShapePath, and casa::PlotShapePolygon.

Definition at line 48 of file PlotShape.h.

virtual PlotLinePtr casa::PlotShape::line ( ) const
pure virtual

Returns a copy of the line used for this shape.

Referenced by setLine().

virtual bool casa::PlotShape::lineShown ( ) const
pure virtual

Returns true if a line is shown for this shape, false otherwise.

virtual void casa::PlotShape::setAreaFill ( const PlotAreaFill fill)
pure virtual

Sets this shape's area fill to the given.

Referenced by setAreaFill().

virtual void casa::PlotShape::setAreaFill ( const PlotAreaFillPtr  f)
inlinevirtual

Convenience methods for setting the area fill.

Definition at line 107 of file PlotShape.h.

References casacore::CountedPtr< T >::null(), setAreaFill(), and setAreaFilled().

virtual void casa::PlotShape::setAreaFill ( const casacore::String color,
PlotAreaFill::Pattern  pattern = PlotAreaFill::FILL 
)
inlinevirtual

Definition at line 111 of file PlotShape.h.

References areaFill(), casacore::pattern(), and setAreaFill().

virtual void casa::PlotShape::setAreaFilled ( bool  area = true)
pure virtual

Sets whether or not this shape has an area fill.

Referenced by setAreaFill().

virtual void casa::PlotShape::setCoordinates ( const std::vector< PlotCoordinate > &  c)
pure virtual

Sets this shape's coordinates to the given.

Must be in the same size and order as that returned by coordinates(). Specific to each shape subclass.

virtual void casa::PlotShape::setLine ( const PlotLine line)
pure virtual

Sets this shape's line to the given.

Referenced by setLine().

virtual void casa::PlotShape::setLine ( const PlotLinePtr  l)
inlinevirtual

IMPLEMENTED METHODS //.

Convenience methods for setting the line for this shape.

Definition at line 91 of file PlotShape.h.

References casacore::CountedPtr< T >::null(), setLine(), and setLineShown().

virtual void casa::PlotShape::setLine ( const casacore::String color,
PlotLine::Style  style = PlotLine::SOLID,
double  width = 1.0 
)
inlinevirtual

Definition at line 95 of file PlotShape.h.

References line(), and setLine().

virtual void casa::PlotShape::setLineShown ( bool  line = true)
pure virtual

Sets whether a line is shown for this shape or not.

Referenced by setLine().


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