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

#include <PlotOptions.h>

Public Member Functions

 PlotColor ()
 Constructor. More...
 
virtual ~PlotColor ()
 Destructor. More...
 
virtual casacore::String asHexadecimal () const =0
 ABSTRACT METHODS //. More...
 
virtual casacore::String asName () const =0
 Returns this color's value as a human-readable name if applicable, or an empty casacore::String if inapplicable. More...
 
virtual void setAsHexadecimalOrName (const casacore::String &str)=0
 If the given casacore::String is a hexadecimal value, sets the color to it. More...
 
virtual double alpha () const =0
 Returns this color's alpha as a value between 0 (transparent) and 1 (opaque). More...
 
virtual void setAlpha (double a)=0
 Sets this color's alpha as a value between 0 (transparent) and 1 (opaque). More...
 
virtual void setAsHexadecimal (const casacore::String &hex)
 CONVENIENCE METHODS //. More...
 
virtual void setAsName (const casacore::String &name)
 Set's this color's value to the given named color. More...
 
virtual casacore::Record toRecord () const
 RECORD METHODS //. More...
 
virtual void fromRecord (const casacore::Record &record)
 
virtual PlotColoroperator= (const PlotColor &rh)
 OPERATORS //. More...
 
virtual bool operator== (const PlotColor &rh) const
 Returns true if this PlotColor is equal to the given; false otherwise. More...
 
virtual bool operator!= (const PlotColor &rh) const
 Returns true if this PlotColor is NOT equal to the given; false otherwise. More...
 

Static Protected Attributes

static const casacore::String REC_HEXADECIMAL
 casacore::Record key names. More...
 
static const casacore::String REC_ALPHA
 

Detailed Description

Definition at line 125 of file PlotOptions.h.

Constructor & Destructor Documentation

casa::PlotColor::PlotColor ( )

Constructor.

virtual casa::PlotColor::~PlotColor ( )
virtual

Destructor.

Member Function Documentation

virtual double casa::PlotColor::alpha ( ) const
pure virtual

Returns this color's alpha as a value between 0 (transparent) and 1 (opaque).

virtual casacore::String casa::PlotColor::asHexadecimal ( ) const
pure virtual

ABSTRACT METHODS //.

Returns this color's value in a hexadecimal form, i.e. "000000".

virtual casacore::String casa::PlotColor::asName ( ) const
pure virtual

Returns this color's value as a human-readable name if applicable, or an empty casacore::String if inapplicable.

virtual void casa::PlotColor::fromRecord ( const casacore::Record record)
virtual
virtual bool casa::PlotColor::operator!= ( const PlotColor rh) const
virtual

Returns true if this PlotColor is NOT equal to the given; false otherwise.

virtual PlotColor& casa::PlotColor::operator= ( const PlotColor rh)
virtual

OPERATORS //.

Assigns the value of the given PlotColor to this one.

virtual bool casa::PlotColor::operator== ( const PlotColor rh) const
virtual

Returns true if this PlotColor is equal to the given; false otherwise.

virtual void casa::PlotColor::setAlpha ( double  a)
pure virtual

Sets this color's alpha as a value between 0 (transparent) and 1 (opaque).

virtual void casa::PlotColor::setAsHexadecimal ( const casacore::String hex)
virtual

CONVENIENCE METHODS //.

Sets this color's value as a hexadecimal value.

virtual void casa::PlotColor::setAsHexadecimalOrName ( const casacore::String str)
pure virtual

If the given casacore::String is a hexadecimal value, sets the color to it.

Otherwise tries to set the color as a name. If the given name is invalid, the behavior is undefined but should probably default to a sensible value.

virtual void casa::PlotColor::setAsName ( const casacore::String name)
virtual

Set's this color's value to the given named color.

virtual casacore::Record casa::PlotColor::toRecord ( ) const
virtual

RECORD METHODS //.

Gets/Sets the color as a Record.

Member Data Documentation

const casacore::String casa::PlotColor::REC_ALPHA
staticprotected

Definition at line 192 of file PlotOptions.h.

const casacore::String casa::PlotColor::REC_HEXADECIMAL
staticprotected

casacore::Record key names.

Definition at line 191 of file PlotOptions.h.


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