casa::PlotColor Class Reference

#include <PlotOptions.h>

List of all members.

Public Member Functions

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

Static Protected Attributes

static const String REC_HEXADECIMAL
 Record key names.
static const String REC_ALPHA

Detailed Description

Definition at line 112 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 String casa::PlotColor::asHexadecimal (  )  const [pure virtual]

ABSTRACT METHODS //.

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

virtual String casa::PlotColor::asName (  )  const [pure virtual]

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

virtual void casa::PlotColor::fromRecord ( const 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 String &  hex  )  [virtual]

CONVENIENCE METHODS //.

Sets this color's value as a hexadecimal value.

virtual void casa::PlotColor::setAsHexadecimalOrName ( const String &  str  )  [pure virtual]

If the given 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 String &  name  )  [virtual]

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

virtual Record casa::PlotColor::toRecord (  )  const [virtual]

RECORD METHODS //.

Gets/Sets the color as a Record.


Member Data Documentation

const String casa::PlotColor::REC_ALPHA [static, protected]

Definition at line 179 of file PlotOptions.h.

const String casa::PlotColor::REC_HEXADECIMAL [static, protected]

Record key names.

Definition at line 178 of file PlotOptions.h.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated on 31 Aug 2016 for casa by  doxygen 1.6.1