-
public bool at_last_line ()
Determines whether iter is on the last line of the layout.
-
public LayoutIter copy ()
Copies a PangLayoutIter.
-
public int get_baseline ()
Gets the Y position of the current line's baseline, in layout coordinates (origin at top left of the
entire layout).
-
public void get_char_extents (out Rectangle logical_rect)
Gets the extents of the current character, in layout coordinates (origin is the top left of the entire
layout). Only logical extents can sensibly be obtained for characters; ink extents make sense only down to the level of clusters.
-
public void get_cluster_extents (out Rectangle ink_rect, out Rectangle logical_rect)
Gets the extents of the current cluster, in layout coordinates (origin is the top left of the entire
layout).
-
public int get_index ()
Gets the current byte index. Note that iterating forward by char moves in visual order, not logical
order, so indexes may not be sequential. Also, the index may be equal to the length of the text in the layout, if on the null
run (see get_run).
-
public weak Layout get_layout ()
-
public void get_layout_extents (out Rectangle ink_rect, out Rectangle logical_rect)
Obtains the extents of the Layout being iterated over.
ink_rect or logical_rect can be null if you aren't interested in them.
-
public weak LayoutLine get_line ()
Gets the current line.
-
public void get_line_extents (out Rectangle ink_rect, out Rectangle logical_rect)
Obtains the extents of the current line. ink_rect or logical_rect can be
null if you aren't interested in them. Extents are in layout coordinates (origin is the top-left corner of the entire
Layout). Thus the extents returned by this function will be the same width/height but
not at the same x/y as the extents returned from get_extents.
-
public weak LayoutLine get_line_readonly ()
Gets the current line for read-only access.
-
public void get_line_yrange (out int y0_, out int y1_)
Divides the vertical space in the Layout being iterated
over between the lines in the layout, and returns the space belonging to the current line. A line's range includes the line's logical
extents, plus half of the spacing above and below the line, if set_spacing
has been called to set layout spacing. The Y positions are in layout coordinates (origin at top left of the entire layout).
-
public unowned LayoutRun get_run ()
Gets the current run. When iterating by run, at the end of each line, there's a position with a
null run, so this function can return null. The null run at the end of each line ensures that all
lines have at least one run, even lines consisting of only a newline.
-
public void get_run_extents (out Rectangle ink_rect, out Rectangle logical_rect)
Gets the extents of the current run in layout coordinates (origin is the top left of the entire layout).
-
public unowned LayoutRun get_run_readonly ()
Gets the current run. When iterating by run, at the end of each line, there's a position with a
null run, so this function can return null. The null run at the end of each line ensures that all
lines have at least one run, even lines consisting of only a newline.
-
public bool next_char ()
Moves iter forward to the next character in visual order. If iter was already
at the end of the layout, returns false.
-
public bool next_cluster ()
Moves iter forward to the next cluster in visual order. If iter was already at
the end of the layout, returns false.
-
public bool next_line ()
Moves iter forward to the start of the next line. If iter is already on the
last line, returns false.
-
public bool next_run ()
Moves iter forward to the next run in visual order. If iter was already at the
end of the layout, returns false.