golib
0.5
|
Text properties. Contains colour and font. More...
#include <texttraits.h>
Public Member Functions | |
TextTraits (const TextTraits &other) | |
TextTraits & | operator= (const TextTraits &other) |
void | setContext (cairo_t *cr) |
void | apply () |
Applies the properties to the current context. Sets colour and creates and sets a current font description. | |
const RGBA & | colour () const |
Gets the colour. More... | |
void | setColour (const RGBA &c) |
Sets the colour. More... | |
const std::string | font () const |
Gets the textual font description. More... | |
void | setFont (const char *f) |
Sets the textual font description. More... | |
PangoLayout * | layout () |
Gets the pango layout for this text object. More... | |
const PangoLayout * | layout () const |
Gets the pango layout for this text object. More... | |
Text properties. Contains colour and font.
const RGBA & goPlot::TextTraits::colour | ( | ) | const |
Gets the colour.
const std::string goPlot::TextTraits::font | ( | ) | const |
Gets the textual font description.
PangoLayout * goPlot::TextTraits::layout | ( | ) |
Gets the pango layout for this text object.
Probably only needed in the drawing code.
const PangoLayout * goPlot::TextTraits::layout | ( | ) | const |
Gets the pango layout for this text object.
Probably only needed in the drawing code.
void goPlot::TextTraits::setColour | ( | const RGBA & | c | ) |
Sets the colour.
c | Font colour. |
void goPlot::TextTraits::setFont | ( | const char * | f | ) |
Sets the textual font description.
The description is passed to pango. See the documentation of pango_font_description_from_string()
.
f | Textual font description. |