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
pango.layout.Layout layout() @property nothrowGet `layout` field. Returns: the layout this line belongs to, might be nullvoid layout(pango.layout.Layout propval) @property nothrowSet `layout` field. Params: propval = the layout this line belongs to, might be nullint startIndex() @property nothrowGet `startIndex` field. Returns: start of line as byte index into layout->textvoid startIndex(int propval) @property nothrowSet `startIndex` field. Params: propval = start of line as byte index into layout->textvoid length(int propval) @property nothrowSet `length` field. Params: propval = length of line in bytesuint isParagraphStart() @property nothrowGet `isParagraphStart` field. Returns: #TRUE if this is the first line of the paragraphvoid isParagraphStart(uint propval) @property nothrowSet `isParagraphStart` field. Params: propval = #TRUE if this is the first line of the paragraphuint resolvedDir() @property nothrowGet `resolvedDir` field. Returns: #Resolved PangoDirection of linevoid resolvedDir(uint propval) @property nothrowSet `resolvedDir` field. Params: propval = #Resolved PangoDirection of linevoid getExtents(out pango.types.Rectangle inkRect, out pango.types.Rectangle logicalRect) nothrowComputes the logical and ink extents of a layout line.void getHeight(out int height) nothrowComputes the height of the line, as the maximum of the heights of fonts used in this line.void getPixelExtents(out pango.types.Rectangle inkRect, out pango.types.Rectangle logicalRect) nothrowComputes the logical and ink extents of layout_line in device units.pango.types.Direction getResolvedDirection() nothrowReturns the resolved direction of the line. Returns: the resolved direction of the lineint getStartIndex() nothrowReturns 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) nothrowGets a list of visual ranges corresponding to a given logical range.void indexToX(int index, bool trailing, out int xPos) nothrowConverts an index within a line to a X position.bool xToIndex(int xPos, out int index, out int trailing) nothrowConverts 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...