pango.LayoutLinea line in a pango.Layout
(new in PyGTK 2.8)Synopsispango.LayoutLinegobject.GBoxedget_extentsget_pixel_extentsindex_to_xindextrailingx_to_indexx_posAncestry+-- gobject.GBoxed
+-- pango.LayoutLine
Attributes
"is_paragraph_start"ReadTrue if this is the first line of
the paragraph"length"Readthe length of the line in bytes"resolved_dir"Readthe resolved direction of line"runs"Reada list containing the runs of the line in visual
order."start_index"Readthe start of the line as byte index into the
layout.
DescriptionA pango.LayoutLine
object represents one of the lines resulting from laying out a paragraph via
pango.Layout. pango.LayoutLine
objects are obtained by calling the pango.Layout.get_line()
method or the pango.LayoutIter.get_line()
method. pango.LayoutLine
objects are only valid until the text, attributes, or settings of the parent
pango.Layout
are modified.Methodspango.LayoutLine.get_extentsget_extentsReturns :a 2-tuple containing 4-tuples representing
the rectangles for the logical and ink extents in Pango
units.This method is available in PyGTK 2.8 and above.The get_extents() method returns the
logical and ink extents rectangles of the layout line in a 2-tuple
containing two 4-tuples which represent the rectangles. See the
documentation for the pango.Font.get_glyph_extents()
method for details about the interpretation of the rectangles. The return
extents are in Pango units (1 device unit = pango.SCALE pango units).pango.LayoutLine.get_pixel_extentsget_pixel_extentsReturns :a 2-tuple containing 4-tuples representing
the rectangles for the logical and ink extents in device
units.This method is available in PyGTK 2.8 and above.The get_pixel_extents() method returns
the logical and ink extents rectangles of the layout line in a 2-tuple
containing two 4-tuples which represent the rectangles. See the
documentation for the pango.Font.get_glyph_extents()
method for details about the interpretation of the rectangles. The return
extents are in device units (1 device unit = pango.SCALE pango
units).pango.LayoutLine.index_to_xindex_to_xindextrailingindex :the byte offset of a grapheme
within the layouttrailing :an integer indicating the edge of the grapheme
to retrieve the position of. If 0, the trailing edge of the grapheme,
if > 0, the leading edge of the grapheme.Returns :the X position in Pango unitsThis method is available in PyGTK 2.8 and above.The index_to_x() method returns the X
position (in Pango units) of the grapheme at the byte offset specified by
index and edge specified by
trailing.pango.LayoutLine.x_to_indexx_to_indexx_posx_pos :the x offset (in Pango units) from the left
edge of the line.Returns :a 3-tuple containing a boolean indicating if the
x_pos is inside the line, the byte offset of the
grapheme and the location in the grapheme.This method is available in PyGTK 2.8 and above.The x_to_index() method returns a
3-tuple containing a boolean that is True if x_pos is
inside the line, the location inside the grapheme - either zero, or the
number of characters in the grapheme. 0 represents the trailing edge of the
grapheme.