W Wrapl, The Programming Language

Libraries:Gtk:Pango:GlyphString

Types

T

Constants

Nil : T

Functions

GetType() : Gtk.GObject.Type.T



New() : Gtk.Pango.GlyphString.T

Create a new T.

Returns the newly allocated T, which should be freed with Free.


Methods

:"="(_ @ T, _ @ T)

:Copy(self @ T) : Gtk.Pango.GlyphString.T

Copy a glyph string and associated storage.

string a T, may be NULL
Returns the newly allocated T, which should be freed with Free, or NULL if string was NULL.


:Extents(self @ T, font @ Gtk.Pango.Font.T, ink_rect @ Gtk.Pango.Rectangle.T, logical_rect @ Gtk.Pango.Rectangle.T) : Std.Object.T

Compute the logical and ink extents of a glyph string. See the documentation for Gtk.Pango.Font.GetGlyphExtents for details about the interpretation of the rectangles.

glyphs a T
font a Gtk.Pango.Font.T
ink_rect rectangle used to store the extents of the glyph string as drawn or NULL to indicate that the result is not needed. [out][allow-none]
logical_rect rectangle used to store the logical extents of the glyph string or NULL to indicate that the result is not needed. [out][allow-none]


:ExtentsRange(self @ T, start @ Std.Integer.SmallT, end @ Std.Integer.SmallT, font @ Gtk.Pango.Font.T, ink_rect @ Gtk.Pango.Rectangle.T, logical_rect @ Gtk.Pango.Rectangle.T) : Std.Object.T

Computes the extents of a sub-portion of a glyph string. The extents are relative to the start of the glyph string range (the origin of their coordinate system is at the start of the range, not at the start of the entire glyph string).

glyphs a T
start start index
end end index (the range is the set of bytes with indices such that start <= index < end)
font a Gtk.Pango.Font.T
ink_rect rectangle used to store the extents of the glyph string range as drawn or NULL to indicate that the result is not needed.
logical_rect rectangle used to store the logical extents of the glyph string range or NULL to indicate that the result is not needed.


:Free(self @ T) : Std.Object.T

Free a glyph string and associated storage.

string a T, may be NULL


:GetLogicalWidths(self @ T, text @ Std.String.T, length @ Std.Integer.SmallT, embedding_level @ Std.Integer.SmallT, logical_widths @ Std.Object.T) : Std.Object.T

Given a T resulting from pango_shape() and the corresponding text, determine the screen width corresponding to each character. When multiple characters compose a single cluster, the width of the entire cluster is divided equally among the characters.

See also Gtk.Pango.GlyphItem.GetLogicalWidths.

glyphs a T
text the text corresponding to the glyphs
length the length of text, in bytes
embedding_level the embedding level of the string
logical_widths an array whose length is the number of characters in text (equal to g_utf8_strlen (text, length) unless text has NUL bytes) to be filled in with the resulting character widths.


:GetWidth(self @ T) : Std.Integer.SmallT

Computes the logical width of the glyph string as can also be computed using Extents. However, since this only computes the width, it's much faster. This is in fact only a convenience function that computes the sum of geometry.width for each glyph in the glyphs.

glyphs a T
Returns the logical width of the glyph string.


:Glyphs(self @ T) : Gtk.Pango.GlyphInfo.T

:IndexToX(self @ T, text @ Std.String.T, length @ Std.Integer.SmallT, analysis @ Gtk.Pango.Analysis.T, index_ @ Std.Integer.SmallT, trailing @ Std.Symbol.T, x_pos @ Std.Object.T) : Std.Object.T

Converts from character position to x position. (X position is measured from the left edge of the run). Character positions are computed by dividing up each cluster into equal portions.

glyphs the glyphs return from pango_shape()
text the text for the run
length the number of bytes (not characters) in text.
analysis the analysis information return from pango_itemize()
index_ the byte index within text
trailing whether we should compute the result for the beginning (FALSE) or end (TRUE) of the character.
x_pos location to store result


:LogClusters(self @ T) : Std.Object.T

:NumGlyphs(self @ T) : Std.Integer.SmallT

:SetSize(self @ T, new_len @ Std.Integer.SmallT) : Std.Object.T

Resize a glyph string to the given length.

string a T.
new_len the new length of the string.


:XToIndex(self @ T, text @ Std.String.T, length @ Std.Integer.SmallT, analysis @ Gtk.Pango.Analysis.T, x_pos @ Std.Integer.SmallT, index_ @ Std.Object.T, trailing @ Std.Object.T) : Std.Object.T

Convert from x offset to character position. Character positions are computed by dividing up each cluster into equal portions. In scripts where positioning within a cluster is not allowed (such as Thai), the returned value may not be a valid cursor position; the caller must combine the result with the logical attributes for the text to compute the valid cursor position.

glyphs the glyphs returned from pango_shape()
text the text for the run
length the number of bytes (not characters) in text.
analysis the analysis information return from pango_itemize()
x_pos the x offset (in Pango units)
index_ location to store calculated byte index within text
trailing location to store a boolean indicating whether the user clicked on the leading or trailing edge of the character.


:setGlyphs(self @ T, value @ Gtk.Pango.GlyphInfo.T) : Gtk.Pango.GlyphInfo.T

:setLogClusters(self @ T, value @ Std.Object.T) : Std.Object.T

:setNumGlyphs(self @ T, value @ Std.Integer.SmallT) : Std.Integer.SmallT

:"~="(_ @ T, _ @ T)