casa  $Rev:20696$
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Public Member Functions
casa::PlotAnnotation Class Reference

PlotAnnotation is an abstraction of text written directly on the canvas. More...

#include <PlotAnnotation.h>

Inheritance diagram for casa::PlotAnnotation:
casa::PlotItem

List of all members.

Public Member Functions

 PlotAnnotation ()
 Constructor.
virtual ~PlotAnnotation ()
 Destructor.
virtual unsigned int drawCount () const
 Implements PlotItem::drawCount().
virtual String text () const =0
 ABSTRACT METHODS //.
virtual void setText (const String &newText)=0
 Sets the text of the annotation.
virtual PlotFontPtr font () const =0
 Returns a copy of the font used in the annotation.
virtual void setFont (const PlotFont &font)=0
 Sets the annotation font to the given.
virtual int orientation () const =0
 Returns orientation in counterclockwise degrees (between 0 and 360).
virtual void setOrientation (int orientation)=0
 Sets the orientation in counterclockwise degrees (between 0 and 360).
virtual PlotCoordinate coordinate () const =0
 Returns the coordinate where the annotation is located on the canvas it is attached to.
virtual void setCoordinate (const PlotCoordinate &coord)=0
 Sets the location of the annotation to the given.
virtual bool outlineShown () const =0
 Returns true if an outline is shown around the annotation, false otherwise.
virtual void setOutlineShown (bool show=true)=0
 Sets whether an outline is shown around the annotation.
virtual PlotLinePtr outline () const =0
 Returns a copy of the line used to draw the outline for this annotation.
virtual void setOutline (const PlotLine &line)=0
 Sets the outline to the given line.
virtual PlotAreaFillPtr background () const =0
 Returns a copy of the area fill used for the annotation's background.
virtual void setBackground (const PlotAreaFill &area)=0
 Sets the annotation's background to the given.
virtual void setFont (const PlotFontPtr font)
 IMPLEMENTED METHODS //.
virtual void setFontColor (const String &color)
virtual void setOutline (const PlotLinePtr line)
 Convenience methods for setting the outline.
virtual void setOutline (const String &color, PlotLine::Style style=PlotLine::SOLID, double width=1.0)
virtual void setBackground (const PlotAreaFillPtr area)
 Convenience methods for setting the background.
virtual void setBackground (const String &color, PlotAreaFill::Pattern pattern=PlotAreaFill::FILL)

Detailed Description

PlotAnnotation is an abstraction of text written directly on the canvas.

An annotation has text, font, orientation, outline, and background properties.

Definition at line 40 of file PlotAnnotation.h.


Constructor & Destructor Documentation

Constructor.

Definition at line 43 of file PlotAnnotation.h.

virtual casa::PlotAnnotation::~PlotAnnotation ( ) [inline, virtual]

Destructor.

Definition at line 46 of file PlotAnnotation.h.


Member Function Documentation

virtual PlotAreaFillPtr casa::PlotAnnotation::background ( ) const [pure virtual]

Returns a copy of the area fill used for the annotation's background.

Referenced by setBackground().

virtual PlotCoordinate casa::PlotAnnotation::coordinate ( ) const [pure virtual]

Returns the coordinate where the annotation is located on the canvas it is attached to.

virtual unsigned int casa::PlotAnnotation::drawCount ( ) const [inline, virtual]

Implements PlotItem::drawCount().

Provides default implementation that returns 1.

Implements casa::PlotItem.

Definition at line 51 of file PlotAnnotation.h.

virtual PlotFontPtr casa::PlotAnnotation::font ( ) const [pure virtual]

Returns a copy of the font used in the annotation.

Referenced by setFontColor().

virtual int casa::PlotAnnotation::orientation ( ) const [pure virtual]

Returns orientation in counterclockwise degrees (between 0 and 360).

virtual PlotLinePtr casa::PlotAnnotation::outline ( ) const [pure virtual]

Returns a copy of the line used to draw the outline for this annotation.

Referenced by setOutline().

virtual bool casa::PlotAnnotation::outlineShown ( ) const [pure virtual]

Returns true if an outline is shown around the annotation, false otherwise.

virtual void casa::PlotAnnotation::setBackground ( const PlotAreaFill area) [pure virtual]

Sets the annotation's background to the given.

Referenced by setBackground().

virtual void casa::PlotAnnotation::setBackground ( const PlotAreaFillPtr  area) [inline, virtual]

Convenience methods for setting the background.

Definition at line 131 of file PlotAnnotation.h.

References casa::SimpleCountedConstPtr< t >::null(), and setBackground().

virtual void casa::PlotAnnotation::setBackground ( const String color,
PlotAreaFill::Pattern  pattern = PlotAreaFill::FILL 
) [inline, virtual]
virtual void casa::PlotAnnotation::setCoordinate ( const PlotCoordinate &  coord) [pure virtual]

Sets the location of the annotation to the given.

virtual void casa::PlotAnnotation::setFont ( const PlotFont font) [pure virtual]

Sets the annotation font to the given.

Referenced by setFont(), and setFontColor().

virtual void casa::PlotAnnotation::setFont ( const PlotFontPtr  font) [inline, virtual]

IMPLEMENTED METHODS //.

Convenience methods for setting font.

Definition at line 104 of file PlotAnnotation.h.

References casa::SimpleCountedConstPtr< t >::null(), and setFont().

virtual void casa::PlotAnnotation::setFontColor ( const String color) [inline, virtual]

Definition at line 106 of file PlotAnnotation.h.

References font(), casa::PlotFont::setColor(), and setFont().

virtual void casa::PlotAnnotation::setOrientation ( int  orientation) [pure virtual]

Sets the orientation in counterclockwise degrees (between 0 and 360).

virtual void casa::PlotAnnotation::setOutline ( const PlotLine line) [pure virtual]

Sets the outline to the given line.

Referenced by setOutline().

virtual void casa::PlotAnnotation::setOutline ( const PlotLinePtr  line) [inline, virtual]

Convenience methods for setting the outline.

Definition at line 115 of file PlotAnnotation.h.

References casa::SimpleCountedConstPtr< t >::null(), setOutline(), and setOutlineShown().

virtual void casa::PlotAnnotation::setOutline ( const String color,
PlotLine::Style  style = PlotLine::SOLID,
double  width = 1.0 
) [inline, virtual]
virtual void casa::PlotAnnotation::setOutlineShown ( bool  show = true) [pure virtual]

Sets whether an outline is shown around the annotation.

Referenced by setOutline().

virtual void casa::PlotAnnotation::setText ( const String newText) [pure virtual]

Sets the text of the annotation.

virtual String casa::PlotAnnotation::text ( ) const [pure virtual]

ABSTRACT METHODS //.

Returns the text of the annotation.


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