| Copyright | Will Thompson and Iñaki García Etxebarria |
|---|---|
| License | LGPL-2.1 |
| Maintainer | Iñaki García Etxebarria |
| Safe Haskell | None |
| Language | Haskell2010 |
GI.Gsk.Objects.TextNode
Description
A render node drawing a set of glyphs.
Synopsis
- newtype TextNode = TextNode (ManagedPtr TextNode)
- class (BoxedPtr o, TypedObject o, IsDescendantOf TextNode o) => IsTextNode o
- toTextNode :: (MonadIO m, IsTextNode o) => o -> m TextNode
- textNodeGetColor :: (HasCallStack, MonadIO m, IsTextNode a) => a -> m RGBA
- textNodeGetFont :: (HasCallStack, MonadIO m, IsTextNode a) => a -> m Font
- textNodeGetGlyphs :: (HasCallStack, MonadIO m, IsTextNode a) => a -> m [GlyphInfo]
- textNodeGetNumGlyphs :: (HasCallStack, MonadIO m, IsTextNode a) => a -> m Word32
- textNodeGetOffset :: (HasCallStack, MonadIO m, IsTextNode a) => a -> m Point
- textNodeHasColorGlyphs :: (HasCallStack, MonadIO m, IsTextNode a) => a -> m Bool
- textNodeNew :: (HasCallStack, MonadIO m, IsFont a) => a -> GlyphString -> RGBA -> Point -> m (Maybe TextNode)
Exported types
Memory-managed wrapper type.
Constructors
| TextNode (ManagedPtr TextNode) |
Instances
| Eq TextNode Source # | |
| BoxedPtr TextNode Source # | |
Defined in GI.Gsk.Objects.TextNode | |
| ManagedPtrNewtype TextNode Source # | |
Defined in GI.Gsk.Objects.TextNode Methods | |
| TypedObject TextNode Source # | |
| HasParentTypes TextNode Source # | |
Defined in GI.Gsk.Objects.TextNode | |
| type ParentTypes TextNode Source # | |
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
| (BoxedPtr o, TypedObject o, IsDescendantOf TextNode o) => IsTextNode o Source # | |
Defined in GI.Gsk.Objects.TextNode | |
toTextNode :: (MonadIO m, IsTextNode o) => o -> m TextNode Source #
Methods
Click to display all available methods, including inherited ones
Methods
draw, hasColorGlyphs, ref, serialize, unref, writeToFile.
Getters
getBounds, getChildren, getColor, getFont, getGlyphs, getNodeType, getNumGlyphs, getOffset, getOpaqueRect.
Setters
None.
getColor
Arguments
| :: (HasCallStack, MonadIO m, IsTextNode a) | |
| => a |
|
| -> m RGBA | Returns: the text color |
Retrieves the color used by the text node.
The value returned by this function will not be correct if the render node was created for a non-sRGB color.
getFont
Arguments
| :: (HasCallStack, MonadIO m, IsTextNode a) | |
| => a |
|
| -> m Font | Returns: the font |
Returns the font used by the text node.
getGlyphs
Arguments
| :: (HasCallStack, MonadIO m, IsTextNode a) | |
| => a |
|
| -> m [GlyphInfo] | Returns: the glyph information |
Retrieves the glyph information in the node.
getNumGlyphs
Arguments
| :: (HasCallStack, MonadIO m, IsTextNode a) | |
| => a |
|
| -> m Word32 | Returns: the number of glyphs |
Retrieves the number of glyphs in the text node.
getOffset
Arguments
| :: (HasCallStack, MonadIO m, IsTextNode a) | |
| => a |
|
| -> 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 |
|
| -> m Bool | Returns: |
Checks whether the text node has color glyphs.
Since: 4.2
new
Arguments
| :: (HasCallStack, MonadIO m, IsFont a) | |
| => a |
|
| -> GlyphString |
|
| -> RGBA |
|
| -> Point |
|
| -> m (Maybe TextNode) | Returns: a new |
Creates a render node that renders the given glyphs.
Note that color may not be used if the font contains
color glyphs.