gi-gsk-4.0.7: 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.CairoNode

Description

A render node for a Cairo surface.

Synopsis

Exported types

newtype CairoNode Source #

Memory-managed wrapper type.

Constructors

CairoNode (ManagedPtr CairoNode) 

Instances

Instances details
Eq CairoNode Source # 
Instance details

Defined in GI.Gsk.Objects.CairoNode

BoxedPtr CairoNode Source # 
Instance details

Defined in GI.Gsk.Objects.CairoNode

ManagedPtrNewtype CairoNode Source # 
Instance details

Defined in GI.Gsk.Objects.CairoNode

Methods

toManagedPtr :: CairoNode -> ManagedPtr CairoNode

TypedObject CairoNode Source # 
Instance details

Defined in GI.Gsk.Objects.CairoNode

Methods

glibType :: IO GType

HasParentTypes CairoNode Source # 
Instance details

Defined in GI.Gsk.Objects.CairoNode

type ParentTypes CairoNode Source # 
Instance details

Defined in GI.Gsk.Objects.CairoNode

type ParentTypes CairoNode = '[RenderNode]

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

Instances details
(BoxedPtr o, TypedObject o, IsDescendantOf CairoNode o) => IsCairoNode o Source # 
Instance details

Defined in GI.Gsk.Objects.CairoNode

toCairoNode :: (MonadIO m, IsCairoNode o) => o -> m CairoNode Source #

Cast to CairoNode, 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, ref, serialize, unref, writeToFile.

Getters

getBounds, getDrawContext, getNodeType, getSurface.

Setters

None.

getDrawContext

cairoNodeGetDrawContext Source #

Arguments

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

node: a GskRenderNode for a Cairo surface

-> m Context

Returns: a Cairo context used for drawing; use cairo_destroy() when done drawing

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

cairoNodeGetSurface Source #

Arguments

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

node: a GskRenderNode for a Cairo surface

-> m Surface

Returns: a Cairo surface

Retrieves the Cairo surface used by the render node.

new

cairoNodeNew Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Rect

bounds: the rectangle to render to

-> m CairoNode

Returns: A new GskRenderNode

Creates a GskRenderNode that will render a cairo surface into the area given by bounds.

You can draw to the cairo surface using cairoNodeGetDrawContext.