Struct
Pango.LayoutLine
Description [src]
struct PangoLayoutLine {
PangoLayout* layout;
gint start_index;
gint length;
GSList* runs;
guint is_paragraph_start;
guint resolved_dir;
}
A PangoLayoutLine
represents one of the lines resulting from laying
out a paragraph via PangoLayout
.
PangoLayoutLine
structures are obtained by calling
pango_layout_get_line()
and are only valid until the text,
attributes, or settings of the parent PangoLayout
are modified.
Structure members
layout |
the layout this line belongs to, might be |
start_index |
start of line as byte index into layout->text |
length |
length of line in bytes |
runs |
list of runs in the line, from left to right |
is_paragraph_start |
|
resolved_dir |
|
Instance methods
pango_layout_line_get_extents
Computes the logical and ink extents of a layout line. See
pango_font_get_glyph_extents()
for details about the
interpretation of the rectangles.
pango_layout_line_get_height
Computes the height of the line, i.e. the distance between this and the previous lines baseline.
Available since: 1.44
pango_layout_line_get_pixel_extents
Computes the logical and ink extents of layout_line
in device units.
pango_layout_line_get_x_ranges
Gets a list of visual ranges corresponding to a given logical range. This list is not necessarily minimal - there may be consecutive ranges which are adjacent. The ranges will be sorted from left to right. The ranges are with respect to the left edge of the entire layout, not with respect to the line.
pango_layout_line_index_to_x
Converts an index within a line to a X position.
pango_layout_line_ref
Increase the reference count of a PangoLayoutLine
by one.
Available since: 1.10
pango_layout_line_unref
Decrease the reference count of a PangoLayoutLine
by one.
If the result is zero, the line and all associated memory
will be freed.
pango_layout_line_x_to_index
Converts from x offset to the byte index of the corresponding character
within the text of the layout. If x_pos
is outside the line, index_
and
trailing
will point to the very first or very last position in the line.
This determination is based on the resolved direction of the paragraph;
for example, if the resolved direction is right-to-left, then an X position
to the right of the line (after it) results in 0 being stored in index_
and trailing
. An X position to the left of the line results in index_
pointing to the (logical) last grapheme in the line and trailing
being
set to the number of characters in that grapheme. The reverse is true for
a left-to-right line.