Public Member Functions | |
FontMetrics () | |
FontMetrics (PangoFontMetrics* gobject, bool make_a_copy=true) | |
FontMetrics (const FontMetrics& other) | |
FontMetrics& | operator= (const FontMetrics& other) |
~FontMetrics () | |
void | swap (FontMetrics& other) |
PangoFontMetrics* | gobj () |
Provides access to the underlying C instance. | |
const PangoFontMetrics* | gobj () const |
Provides access to the underlying C instance. | |
PangoFontMetrics* | gobj_copy () const |
Provides access to the underlying C instance. The caller is responsible for freeing it. Use when directly setting fields in structs. | |
int | get_ascent () const |
Gets the ascent from a font metrics structure. | |
int | get_descent () const |
Gets the descent from a font metrics structure. | |
int | get_approximate_char_width () const |
Gets the approximate character width for a font metrics structure. | |
int | get_approximate_digit_width () const |
Gets the approximate digit width for a font metrics structure. | |
int | get_underline_position () const |
Gets the suggested position to draw the underline. | |
int | get_underline_thickness () const |
Gets the suggested thickness to draw for the underline. | |
int | get_strikethrough_position () const |
Gets the suggested position to draw the strikethrough. | |
int | get_strikethrough_thickness () const |
Gets the suggested thickness to draw for the strikethrough. | |
Protected Attributes | |
PangoFontMetrics* | gobject_ |
Related Functions | |
(Note that these are not member functions.) | |
void | swap (FontMetrics& lhs, FontMetrics& rhs) |
Pango::FontMetrics | wrap (PangoFontMetrics* object, bool take_copy=false) |
A Glib::wrap() method for this object. |
Pango::FontMetrics::FontMetrics | ( | ) |
Pango::FontMetrics::FontMetrics | ( | PangoFontMetrics * | gobject, | |
bool | make_a_copy = true | |||
) | [explicit] |
Pango::FontMetrics::FontMetrics | ( | const FontMetrics& | other | ) |
Pango::FontMetrics::~FontMetrics | ( | ) |
int Pango::FontMetrics::get_approximate_char_width | ( | ) | const |
Gets the approximate character width for a font metrics structure.
This is merely a representative value useful, for example, for determining the initial size for a window. Actual characters in text will be wider and narrower than this.
int Pango::FontMetrics::get_approximate_digit_width | ( | ) | const |
Gets the approximate digit width for a font metrics structure.
This is merely a representative value useful, for example, for determining the initial size for a window. Actual digits in text can be wider or narrower than this, though this value is generally somewhat more accurate than the result of metrics_get_approximate_char_width() for digits.
int Pango::FontMetrics::get_ascent | ( | ) | const |
Gets the ascent from a font metrics structure.
The ascent is the distance from the baseline to the logical top of a line of text. (The logical top may be above or below the top of the actual drawn ink. It is necessary to lay out the text to figure where the ink will be.)
int Pango::FontMetrics::get_descent | ( | ) | const |
Gets the descent from a font metrics structure.
The descent is the distance from the baseline to the logical bottom of a line of text. (The logical bottom may be above or below the bottom of the actual drawn ink. It is necessary to lay out the text to figure where the ink will be.)
int Pango::FontMetrics::get_strikethrough_position | ( | ) | const |
Gets the suggested position to draw the strikethrough.
The value returned is the distance <emphasis>above</emphasis> the baseline of the top of the strikethrough.
int Pango::FontMetrics::get_strikethrough_thickness | ( | ) | const |
Gets the suggested thickness to draw for the strikethrough.
int Pango::FontMetrics::get_underline_position | ( | ) | const |
Gets the suggested position to draw the underline.
The value returned is the distance <emphasis>above</emphasis> the baseline of the top of the underline. Since most fonts have underline positions beneath the baseline, this value is typically negative.
int Pango::FontMetrics::get_underline_thickness | ( | ) | const |
Gets the suggested thickness to draw for the underline.
const PangoFontMetrics* Pango::FontMetrics::gobj | ( | ) | const [inline] |
Provides access to the underlying C instance.
PangoFontMetrics* Pango::FontMetrics::gobj | ( | ) | [inline] |
Provides access to the underlying C instance.
PangoFontMetrics* Pango::FontMetrics::gobj_copy | ( | ) | const |
Provides access to the underlying C instance. The caller is responsible for freeing it. Use when directly setting fields in structs.
FontMetrics& Pango::FontMetrics::operator= | ( | const FontMetrics& | other | ) |
void Pango::FontMetrics::swap | ( | FontMetrics& | other | ) |
void swap | ( | FontMetrics& | lhs, | |
FontMetrics& | rhs | |||
) | [related] |
lhs | The left-hand side | |
rhs | The right-hand side |
Pango::FontMetrics wrap | ( | PangoFontMetrics * | object, | |
bool | take_copy = false | |||
) | [related] |
A Glib::wrap() method for this object.
object | The C instance. | |
take_copy | False if the result should take ownership of the C instance. True if it should take a new copy or ref. |
PangoFontMetrics* Pango::FontMetrics::gobject_ [protected] |