|
Public Methods |
| Rectangle () |
| Rectangle (int x, int y, int width, int height) |
| Rectangle (const PangoRectangle* src) |
void | set_x (int x) |
| Sets the X coordinate of the left side of the rectangle.
|
void | set_y (int y) |
| Sets the Y coordinate of the top side of the rectangle.
|
void | set_width (int w) |
| Sets the width of the rectangle.
|
void | set_height (int h) |
| Sets the height of the rectangle.
|
int | get_x () const |
| Gets the X coordinate of the left side of the rectangle.
|
int | get_y () const |
| Gets the Y coordinate of the top side of the rectangle.
|
int | get_width () const |
| Gets the width of the rectangle.
|
int | get_height () const |
| Gets the height of the rectangle.
|
int | get_ascent () const |
| Extracts the ascent from a Pango::Rectangle representing glyph extents.
|
int | get_descent () const |
| Extracts the descent from a Pango::Rectangle representing glyph extents.
|
int | get_lbearing () const |
| Extracts the left bearing from a Pango::Rectangle representing glyph extents.
|
int | get_rbearing () const |
| Extracts the right bearing from a Pango::Rectangle representing glyph extents.
|
bool | equal (const Rectangle& rhs) const |
| Checks for equality of two Pango::Rectangles.
|
PangoRectangle* | gobj () |
const PangoRectangle* | gobj () const |
Protected Attributes |
PangoRectangle | gobject_ |
Related Functions |
(Note that these are not member functions.)
|
bool | operator== (const Rectangle& lhs, const Rectangle& rhs) |
bool | operator!= (const Rectangle& lhs, const Rectangle& rhs) |
Pango::Rectangle& | wrap (PangoRectangle* object) |
const Pango::Rectangle& | wrap (const PangoRectangle* object) |
It is frequently used to represent the logical or ink extents of a single glyph or section of text. The coordinate system for each rectangle has its origin at the base line and the horizontal origin of the character with increasing coordinates extending to the right and down. get_ascent(), get_descent(), get_lbearing(), and get_rbearing() can be used to convert from the extents rectangle to more traditional font metrics. The units of rectangles usually are in 1/Pango::SCALE of a device unit.