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 elsewhere. See also Gnome::N::TopLevelSupportClass.
multi method new ( N-Object :$native-object! )
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 \)
$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 )
Return value; the text color.
get-font
Returns the font used by the text $node
.
method get-font (--> N-Object )
Return value; the font.
get-glyphs
Retrieves the glyph information in the $node
.
method get-glyphs ( Array[Int] $n-glyphs --> N-Object )
$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 )
Return value; the number of glyphs.
get-offset
Retrieves the offset applied to the text.
method get-offset (--> N-Object )
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 )
Return value; True
if the text node has color glyphs.