| Copyright | Will Thompson and Iñaki García Etxebarria |
|---|---|
| License | LGPL-2.1 |
| Maintainer | Iñaki García Etxebarria |
| Safe Haskell | Safe-Inferred |
| Language | Haskell2010 |
GI.Gsk.Objects.CairoNode
Description
A render node for a Cairo surface.
Synopsis
- newtype CairoNode = CairoNode (ManagedPtr CairoNode)
- class (BoxedPtr o, TypedObject o, IsDescendantOf CairoNode o) => IsCairoNode o
- toCairoNode :: (MonadIO m, IsCairoNode o) => o -> m CairoNode
- cairoNodeGetDrawContext :: (HasCallStack, MonadIO m, IsCairoNode a) => a -> m Context
- cairoNodeGetSurface :: (HasCallStack, MonadIO m, IsCairoNode a) => a -> m Surface
- cairoNodeNew :: (HasCallStack, MonadIO m) => Rect -> m CairoNode
Exported types
Memory-managed wrapper type.
Instances
| Eq CairoNode Source # | |
| BoxedPtr CairoNode Source # | |
Defined in GI.Gsk.Objects.CairoNode | |
| ManagedPtrNewtype CairoNode Source # | |
Defined in GI.Gsk.Objects.CairoNode Methods toManagedPtr :: CairoNode -> ManagedPtr CairoNode | |
| TypedObject CairoNode Source # | |
Defined in GI.Gsk.Objects.CairoNode | |
| HasParentTypes CairoNode Source # | |
Defined in GI.Gsk.Objects.CairoNode | |
| type ParentTypes CairoNode Source # | |
Defined in GI.Gsk.Objects.CairoNode | |
class (BoxedPtr o, TypedObject o, IsDescendantOf CairoNode o) => IsCairoNode o Source #
Type class for types which can be safely cast to CairoNode, for instance with toCairoNode.
Instances
| (BoxedPtr o, TypedObject o, IsDescendantOf CairoNode o) => IsCairoNode o Source # | |
Defined in GI.Gsk.Objects.CairoNode | |
toCairoNode :: (MonadIO m, IsCairoNode o) => o -> m CairoNode Source #
Methods
Click to display all available methods, including inherited ones
Methods
draw, ref, serialize, unref, writeToFile.
Getters
getBounds, getDrawContext, getNodeType, getSurface.
Setters
None.
getDrawContext
cairoNodeGetDrawContext Source #
Arguments
| :: (HasCallStack, MonadIO m, IsCairoNode a) | |
| => a |
|
| -> m Context | Returns: a Cairo context used for drawing; use
|
Creates a Cairo context for drawing using the surface associated to the render node.
If no surface exists yet, a surface will be created optimized for
rendering to renderer.
getSurface
Arguments
| :: (HasCallStack, MonadIO m, IsCairoNode a) | |
| => a |
|
| -> m Surface | Returns: a Cairo surface |
Retrieves the Cairo surface used by the render node.
new
Arguments
| :: (HasCallStack, MonadIO m) | |
| => Rect |
|
| -> m CairoNode | Returns: A new |
Creates a GskRenderNode that will render a cairo surface
into the area given by bounds.
You can draw to the cairo surface using cairoNodeGetDrawContext.