About my projects, examples and tutorials
Gnome::Gsk4::TextNode

Gnome::Gsk4::TextNode

Description§

A render node drawing a set of glyphs.

Class initialization§

new§

:native-object§

Create an object using a native object from an object of the same type found elsewhere. See also Gnome::N::TopLevelSupportClass.

multi method new ( N-Object() :$native-object! )
Code

new-textnode§

Creates a render node that renders the given glyphs.

Note that $color may not be used if the font contains color glyphs.

method new-textnode ( N-Object() $font, N-Object $glyphs, N-Object $color, N-Object $offset --> Gnome::Gsk4::TextNode \)
Code
  • $font; the Gnome::Pango::Font containing the glyphs.
  • $glyphs; the Gnome::Pango::N-GlyphString to render
  • $color; the foreground color to render with
  • $offset; offset of the baseline

Methods§

get-color§

Retrieves the color used by the text $node.

method get-color (--> N-Object )
Code

Return value; the text color.

get-font§

Returns the font used by the text $node.

method get-font (--> N-Object )
Code

Return value; the font.

get-glyphs§

Retrieves the glyph information in the $node.

method get-glyphs ( Array[Int] $n-glyphs --> N-Object )
Code
  • $n-glyphs; (transfer ownership: full) the number of glyphs returned.

Return value; the glyph information.

get-num-glyphs§

Retrieves the number of glyphs in the text node.

method get-num-glyphs (--> UInt )
Code

Return value; the number of glyphs.

get-offset§

Retrieves the offset applied to the text.

method get-offset (--> N-Object )
Code

Return value; a point with the horizontal and vertical offsets.

has-color-glyphs§

Checks whether the text $node has color glyphs.

method has-color-glyphs (--> Bool )
Code

Return value; True if the text node has color glyphs.