Abstract class for fonts. More...
#include <PlotOptions.h>
Public Member Functions | |
| PlotFont () | |
| Constructor. | |
| virtual | ~PlotFont () |
| Destructor. | |
| virtual double | pointSize () const =0 |
| ABSTRACT METHODS //. | |
| virtual void | setPointSize (double size)=0 |
| Sets the point size of this font to the given. | |
| virtual int | pixelSize () const =0 |
| Returns the pixel size of this font, or -1 if the size was set in points. | |
| virtual void | setPixelSize (int size)=0 |
| Sets the pixel size of this font to the given. | |
| virtual String | fontFamily () const =0 |
| Returns the font family. | |
| virtual void | setFontFamily (const String &font)=0 |
| Sets the font family to the given. | |
| virtual PlotColorPtr | color () const =0 |
| Returns a copy of the color for this font. | |
| virtual void | setColor (const PlotColor &color)=0 |
| Sets the color of this font to the given. | |
| virtual bool | italics () const =0 |
| Gets/sets whether this font is italicized, bolded, and/or underlined, respectively. | |
| virtual void | setItalics (bool i=true)=0 |
| virtual bool | bold () const =0 |
| virtual void | setBold (bool b=true)=0 |
| virtual bool | underline () const =0 |
| virtual void | setUnderline (bool u=true)=0 |
| virtual void | setColor (const PlotColorPtr c) |
| CONVENIENCE METHODS //. | |
| virtual void | setColor (const String &col) |
| virtual Record | toRecord () const |
| RECORD METHODS //. | |
| virtual void | fromRecord (const Record &record) |
| virtual PlotFont & | operator= (const PlotFont &rh) |
| OPERATORS //. | |
| virtual bool | operator== (const PlotFont &rh) const |
| Returns true if this PlotFont is equal to the given; false otherwise. | |
| virtual bool | operator!= (const PlotFont &rh) const |
| Returns true if this PlotFont is NOT equal to the given; false otherwise. | |
Static Protected Attributes | |
| static const String | REC_POINTSIZE |
| Record key names. | |
| static const String | REC_PIXELSIZE |
| static const String | REC_FAMILY |
| static const String | REC_COLOR |
| static const String | REC_ITALICS |
| static const String | REC_BOLD |
| static const String | REC_UNDERLINE |
Abstract class for fonts.
A font has a family, size, color, bold, italics, and underline properties.
Definition at line 187 of file PlotOptions.h.
| casa::PlotFont::PlotFont | ( | ) |
Constructor.
| virtual casa::PlotFont::~PlotFont | ( | ) | [virtual] |
Destructor.
| virtual bool casa::PlotFont::bold | ( | ) | const [pure virtual] |
| virtual PlotColorPtr casa::PlotFont::color | ( | ) | const [pure virtual] |
Returns a copy of the color for this font.
| virtual String casa::PlotFont::fontFamily | ( | ) | const [pure virtual] |
Returns the font family.
| virtual void casa::PlotFont::fromRecord | ( | const Record & | record | ) | [virtual] |
| virtual bool casa::PlotFont::italics | ( | ) | const [pure virtual] |
Gets/sets whether this font is italicized, bolded, and/or underlined, respectively.
| virtual bool casa::PlotFont::operator!= | ( | const PlotFont & | rh | ) | const [virtual] |
Returns true if this PlotFont is NOT equal to the given; false otherwise.
OPERATORS //.
Assigns the value of the given PlotFont to this one.
| virtual bool casa::PlotFont::operator== | ( | const PlotFont & | rh | ) | const [virtual] |
Returns true if this PlotFont is equal to the given; false otherwise.
| virtual int casa::PlotFont::pixelSize | ( | ) | const [pure virtual] |
Returns the pixel size of this font, or -1 if the size was set in points.
| virtual double casa::PlotFont::pointSize | ( | ) | const [pure virtual] |
ABSTRACT METHODS //.
Returns the point size of this font, or -1 if the size was set in pixels.
| virtual void casa::PlotFont::setBold | ( | bool | b = true |
) | [pure virtual] |
| virtual void casa::PlotFont::setColor | ( | const String & | col | ) | [virtual] |
| virtual void casa::PlotFont::setColor | ( | const PlotColorPtr | c | ) | [virtual] |
CONVENIENCE METHODS //.
Convenience methods for setting color.
| virtual void casa::PlotFont::setColor | ( | const PlotColor & | color | ) | [pure virtual] |
Sets the color of this font to the given.
| virtual void casa::PlotFont::setFontFamily | ( | const String & | font | ) | [pure virtual] |
Sets the font family to the given.
| virtual void casa::PlotFont::setItalics | ( | bool | i = true |
) | [pure virtual] |
| virtual void casa::PlotFont::setPixelSize | ( | int | size | ) | [pure virtual] |
Sets the pixel size of this font to the given.
| virtual void casa::PlotFont::setPointSize | ( | double | size | ) | [pure virtual] |
Sets the point size of this font to the given.
| virtual void casa::PlotFont::setUnderline | ( | bool | u = true |
) | [pure virtual] |
| virtual Record casa::PlotFont::toRecord | ( | ) | const [virtual] |
RECORD METHODS //.
Gets/Sets the color as a Record.
| virtual bool casa::PlotFont::underline | ( | ) | const [pure virtual] |
const String casa::PlotFont::REC_BOLD [static, protected] |
Definition at line 274 of file PlotOptions.h.
const String casa::PlotFont::REC_COLOR [static, protected] |
Definition at line 272 of file PlotOptions.h.
const String casa::PlotFont::REC_FAMILY [static, protected] |
Definition at line 271 of file PlotOptions.h.
const String casa::PlotFont::REC_ITALICS [static, protected] |
Definition at line 273 of file PlotOptions.h.
const String casa::PlotFont::REC_PIXELSIZE [static, protected] |
Definition at line 270 of file PlotOptions.h.
const String casa::PlotFont::REC_POINTSIZE [static, protected] |
Record key names.
Definition at line 269 of file PlotOptions.h.
const String casa::PlotFont::REC_UNDERLINE [static, protected] |
Definition at line 275 of file PlotOptions.h.
1.6.1