Package ch.bailu.gtk.gsk
Class TextNode
java.lang.Object
ch.bailu.gtk.type.Type
ch.bailu.gtk.type.Pointer
ch.bailu.gtk.gsk.RenderNode
ch.bailu.gtk.gsk.TextNode
- All Implemented Interfaces:
PointerInterface
A render node drawing a set of glyphs.
-
Nested Class Summary
Nested classes/interfaces inherited from class ch.bailu.gtk.gsk.RenderNode
RenderNode.OnParseErrorFunc
-
Field Summary
-
Constructor Summary
ConstructorDescriptionTextNode
(Font font, GlyphString glyphs, RGBA color, Point offset) Creates a render node that renders the given glyphs.TextNode
(PointerContainer pointer) -
Method Summary
Modifier and TypeMethodDescriptionstatic ClassHandler
getColor()
Retrieves the color used by the text @node.getFont()
Returns the font used by the text @node.static int
int
Retrieves the number of glyphs in the text node.Retrieves the offset applied to the text.static long
static TypeSystem.TypeSize
static long
static TypeSystem.TypeSize
boolean
Checks whether the text @node has color glyphs.Methods inherited from class ch.bailu.gtk.gsk.RenderNode
deserialize, draw, getBounds, getNodeType, ref, serialize, unref, writeToFile, writeToFile
Methods inherited from class ch.bailu.gtk.type.Pointer
asCPointer, cast, connectSignal, disconnectSignals, disconnectSignals, equals, hashCode, throwIfNull, throwNullPointerException, toString, unregisterCallbacks, unregisterCallbacks
Methods inherited from class ch.bailu.gtk.type.Type
asCPointer, asCPointer, asCPointerNotNull, asJnaPointer, asJnaPointer, asPointer, asPointer, cast, cast, throwIfNull
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface ch.bailu.gtk.type.PointerInterface
asCPointerNotNull, asJnaPointer, asPointer, isNotNull, isNull
-
Constructor Details
-
TextNode
-
TextNode
public TextNode(@Nonnull Font font, @Nonnull GlyphString glyphs, @Nonnull RGBA color, @Nonnull Point offset) Creates a render node that renders the given glyphs.
Note that @color may not be used if the font contains
color glyphs.- Parameters:
font
- the `PangoFont` containing the glyphsglyphs
- the `PangoGlyphString` to rendercolor
- the foreground color to render withoffset
- offset of the baseline
-
-
Method Details
-
getClassHandler
-
getColor
Retrieves the color used by the text @node.- Returns:
- the text color
-
getFont
Returns the font used by the text @node.- Returns:
- the font
-
getNumGlyphs
public int getNumGlyphs()Retrieves the number of glyphs in the text node.- Returns:
- the number of glyphs
-
getOffset
Retrieves the offset applied to the text.- Returns:
- a point with the horizontal and vertical offsets
-
hasColorGlyphs
public boolean hasColorGlyphs()Checks whether the text @node has color glyphs.- Returns:
- %TRUE if the text node has color glyphs
-
getTypeID
public static long getTypeID() -
getParentTypeID
public static long getParentTypeID() -
getTypeSize
-
getParentTypeSize
-
getInstanceSize
public static int getInstanceSize()
-