gi-gsk-4.0.4: Gsk bindings
CopyrightWill Thompson and Iñaki García Etxebarria
LicenseLGPL-2.1
MaintainerIñaki García Etxebarria
Safe HaskellSafe-Inferred
LanguageHaskell2010

GI.Gsk.Objects.TextNode

Description

A render node drawing a set of glyphs.

Synopsis

Exported types

newtype TextNode Source #

Memory-managed wrapper type.

Constructors

TextNode (ManagedPtr TextNode) 

Instances

Instances details
Eq TextNode Source # 
Instance details

Defined in GI.Gsk.Objects.TextNode

BoxedPtr TextNode Source # 
Instance details

Defined in GI.Gsk.Objects.TextNode

ManagedPtrNewtype TextNode Source # 
Instance details

Defined in GI.Gsk.Objects.TextNode

TypedObject TextNode Source # 
Instance details

Defined in GI.Gsk.Objects.TextNode

Methods

glibType :: IO GType #

HasParentTypes TextNode Source # 
Instance details

Defined in GI.Gsk.Objects.TextNode

type ParentTypes TextNode Source # 
Instance details

Defined in GI.Gsk.Objects.TextNode

class (BoxedPtr o, TypedObject o, IsDescendantOf TextNode o) => IsTextNode o Source #

Type class for types which can be safely cast to TextNode, for instance with toTextNode.

Instances

Instances details
(BoxedPtr o, TypedObject o, IsDescendantOf TextNode o) => IsTextNode o Source # 
Instance details

Defined in GI.Gsk.Objects.TextNode

toTextNode :: (MonadIO m, IsTextNode o) => o -> m TextNode Source #

Cast to TextNode, for types for which this is known to be safe. For general casts, use castTo.

Methods

Click to display all available methods, including inherited ones

Expand

Methods

draw, hasColorGlyphs, ref, serialize, unref, writeToFile.

Getters

getBounds, getColor, getFont, getGlyphs, getNodeType, getNumGlyphs, getOffset.

Setters

None.

getColor

textNodeGetColor Source #

Arguments

:: (HasCallStack, MonadIO m, IsTextNode a) 
=> a

node: a text GskRenderNode

-> m RGBA

Returns: the text color

Retrieves the color used by the text node.

getFont

textNodeGetFont Source #

Arguments

:: (HasCallStack, MonadIO m, IsTextNode a) 
=> a

node: The GskRenderNode

-> m Font

Returns: the font

Returns the font used by the text node.

getGlyphs

textNodeGetGlyphs Source #

Arguments

:: (HasCallStack, MonadIO m, IsTextNode a) 
=> a

node: a text GskRenderNode

-> m [GlyphInfo]

Returns: the glyph information

Retrieves the glyph information in the node.

getNumGlyphs

textNodeGetNumGlyphs Source #

Arguments

:: (HasCallStack, MonadIO m, IsTextNode a) 
=> a

node: a text GskRenderNode

-> m Word32

Returns: the number of glyphs

Retrieves the number of glyphs in the text node.

getOffset

textNodeGetOffset Source #

Arguments

:: (HasCallStack, MonadIO m, IsTextNode a) 
=> a

node: a text GskRenderNode

-> m Point

Returns: a point with the horizontal and vertical offsets

Retrieves the offset applied to the text.

hasColorGlyphs

textNodeHasColorGlyphs Source #

Arguments

:: (HasCallStack, MonadIO m, IsTextNode a) 
=> a

node: a text GskRenderNode

-> m Bool

Returns: True if the text node has color glyphs

Checks whether the text node has color glyphs.

new

textNodeNew Source #

Arguments

:: (HasCallStack, MonadIO m, IsFont a) 
=> a

font: the PangoFont containing the glyphs

-> GlyphString

glyphs: the PangoGlyphString to render

-> RGBA

color: the foreground color to render with

-> Point

offset: offset of the baseline

-> m (Maybe TextNode)

Returns: a new GskRenderNode

Creates a render node that renders the given glyphs.

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