pangomm 2.54.0
|
A Pango::Rectangle represents a rectangle. More...
#include <pangomm/rectangle.h>
Public Member Functions | |
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 () |
Provides access to the underlying C GObject. | |
const PangoRectangle * | gobj () const |
Provides access to the underlying C GObject. | |
Protected Attributes | |
PangoRectangle | gobject_ |
Related Symbols | |
(Note that these are not member symbols.) | |
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) |
A Pango::Rectangle represents a rectangle.
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/PangoSCALE of a device unit.
Pango::Rectangle::Rectangle | ( | ) |
|
explicit |
Checks for equality of two Pango::Rectangles.
rhs | The Pango::Rectangle to compare with. |
|
inline |
Extracts the ascent from a Pango::Rectangle representing glyph extents.
The ascent is the distance from the baseline to the highest point of the character. This is positive if the glyph ascends above the baseline.
|
inline |
Extracts the descent from a Pango::Rectangle representing glyph extents.
The descent is the distance from the baseline to the lowest point of the character. This is positive if the glyph descends below the baseline.
|
inline |
Gets the height of the rectangle.
|
inline |
Extracts the left bearing from a Pango::Rectangle representing glyph extents.
The left bearing is the distance from the horizontal origin to the farthest left point of the character. This is positive for characters drawn completely to the right of the glyph origin.
|
inline |
Extracts the right bearing from a Pango::Rectangle representing glyph extents.
The right bearing is the distance from the horizontal origin to the farthest right point of the character. This is positive except for characters drawn completely to the left of the horizontal origin.
|
inline |
Gets the width of the rectangle.
|
inline |
Gets the X coordinate of the left side of the rectangle.
|
inline |
Gets the Y coordinate of the top side of the rectangle.
|
inline |
Provides access to the underlying C GObject.
|
inline |
Provides access to the underlying C GObject.
Sets the height of the rectangle.
h | The new height. |
Sets the width of the rectangle.
w | The new width. |
Sets the X coordinate of the left side of the rectangle.
x | The new X coordinate. |
Sets the Y coordinate of the top side of the rectangle.
y | The new Y coordinate. |
|
related |
|
related |
|
protected |