Copyright | Will Thompson Iñaki García Etxebarria and Jonas Platte |
---|---|
License | LGPL-2.1 |
Maintainer | Iñaki García Etxebarria |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
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
- textNodeNew :: (HasCallStack, MonadIO m, IsFont a) => a -> GlyphString -> RGBA -> Point -> m (Maybe TextNode)
Exported types
Memory-managed wrapper type.
Instances
Eq TextNode Source # | |
BoxedPtr TextNode Source # | |
Defined in GI.Gsk.Objects.TextNode boxedPtrCopy :: TextNode -> IO TextNode boxedPtrFree :: TextNode -> IO () | |
ManagedPtrNewtype TextNode Source # | |
Defined in GI.Gsk.Objects.TextNode toManagedPtr :: TextNode -> ManagedPtr TextNode | |
TypedObject TextNode Source # | |
Defined in GI.Gsk.Objects.TextNode | |
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, getColor, getFont, getGlyphs, getNodeType, getNumGlyphs, getOffset.
Setters
None.
getColor
:: (HasCallStack, MonadIO m, IsTextNode a) | |
=> a |
|
-> m RGBA | Returns: the text color |
Retrieves the color used by the text node
.
getFont
:: (HasCallStack, MonadIO m, IsTextNode a) | |
=> a |
|
-> m Font | Returns: the font |
Returns the font used by the text node
.
getGlyphs
:: (HasCallStack, MonadIO m, IsTextNode a) | |
=> a |
|
-> m [GlyphInfo] | Returns: the glyph information |
Retrieves the glyph information in the node
.
getNumGlyphs
:: (HasCallStack, MonadIO m, IsTextNode a) | |
=> a |
|
-> m Word32 | Returns: the number of glyphs |
Retrieves the number of glyphs in the text node.
getOffset
:: (HasCallStack, MonadIO m, IsTextNode a) | |
=> a |
|
-> m Point | Returns: a point with the horizontal and vertical offsets |
Retrieves the offset applied to the text.
new
:: (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.