pango.layout_line
Module for [LayoutLine] class
class LayoutLine
Types 1
classLayoutLine : gobject.boxed.Boxed
A [pango.layout_line.LayoutLine] represents one of the lines resulting from laying out a paragraph via [pango.layout.Layout].
[pango.layout_line.LayoutLine] structures are obtained by calling [pango.layout.Layout.getLine] and are only valid until the text, attributes, or settings of the parent [pango.layout.Layout] are modified.
Methods
LayoutLine self()Returns `this`, for use in `with` statements.pango.layout.Layout layout() @propertyGet `layout` field. Returns: the layout this line belongs to, might be nullvoid layout(pango.layout.Layout propval) @propertySet `layout` field. Params: propval = the layout this line belongs to, might be nullint startIndex() @propertyGet `startIndex` field. Returns: start of line as byte index into layout->textvoid startIndex(int propval) @propertySet `startIndex` field. Params: propval = start of line as byte index into layout->textuint isParagraphStart() @propertyGet `isParagraphStart` field. Returns: #TRUE if this is the first line of the paragraphvoid isParagraphStart(uint propval) @propertySet `isParagraphStart` field. Params: propval = #TRUE if this is the first line of the paragraphvoid resolvedDir(uint propval) @propertySet `resolvedDir` field. Params: propval = #Resolved PangoDirection of linevoid getExtents(out pango.types.Rectangle inkRect, out pango.types.Rectangle logicalRect)Computes the logical and ink extents of a layout line.void getHeight(out int height)Computes the height of the line, as the maximum of the heights of fonts used in this line.int getLength()Returns the length of the line, in bytes. Returns: the length of the linevoid getPixelExtents(out pango.types.Rectangle inkRect, out pango.types.Rectangle logicalRect)Computes the logical and ink extents of layout_line in device units.pango.types.Direction getResolvedDirection()Returns the resolved direction of the line. Returns: the resolved direction of the lineint getStartIndex()Returns the start index of the line, as byte index into the text of the layout. Returns: the start index of the linevoid getXRanges(int startIndex, int endIndex, out int[] ranges)Gets a list of visual ranges corresponding to a given logical range.void indexToX(int index, bool trailing, out int xPos)Converts an index within a line to a X position.bool xToIndex(int xPos, out int index, out int trailing)Converts from x offset to the byte index of the corresponding character within the text of the layout.Constructors
this(pango.layout.Layout layout = pango.layout.Layout.init, int startIndex = int.init, int length = int.init, uint isParagraphStart = uint.init, uint resolvedDir = uint.init)Create a `layout_line.LayoutLine` boxed type. Params: layout = the layout this line belongs to, might be null startIndex = start of line as byte index into layout->text length = length of line in b...