Method
PangoLayoutget_extents
Declaration [src]
void
pango_layout_get_extents (
PangoLayout* layout,
PangoRectangle* ink_rect,
PangoRectangle* logical_rect
)
Description [src]
Computes the logical and ink extents of layout
.
Logical extents are usually what you want for positioning things. Note that both extents may have non-zero x and y. You may want to use those to offset where you render the layout. Not doing that is a very typical bug that shows up as right-to-left layouts not being correctly positioned in a layout with a set width.
The extents are given in layout coordinates and in Pango units; layout coordinates begin at the top left corner of the layout.
Parameters
ink_rect
-
Type:
PangoRectangle
Rectangle used to store the extents of the layout as drawn.
The argument will be set by the function. The argument can be NULL
.The returned data is owned by the instance. logical_rect
-
Type:
PangoRectangle
Rectangle used to store the logical extents of the layout.
The argument will be set by the function. The argument can be NULL
.The returned data is owned by the instance.