gi-gdk4-4.0.10: Gdk bindings
CopyrightWill Thompson and Iñaki García Etxebarria
LicenseLGPL-2.1
MaintainerIñaki García Etxebarria
Safe HaskellNone
LanguageHaskell2010

GI.Gdk.Objects.CairoContext

Description

Represents the platform-specific draw context.

GdkCairoContexts are created for a surface using surfaceCreateCairoContext, and the context can then be used to draw on that surface.

Synopsis

Exported types

class (GObject o, IsDescendantOf CairoContext o) => IsCairoContext o Source #

Type class for types which can be safely cast to CairoContext, for instance with toCairoContext.

Instances

Instances details
(GObject o, IsDescendantOf CairoContext o) => IsCairoContext o Source # 
Instance details

Defined in GI.Gdk.Objects.CairoContext

toCairoContext :: (MonadIO m, IsCairoContext o) => o -> m CairoContext Source #

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

Methods

cairoCreate

cairoContextCairoCreate Source #

Arguments

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

self: a GdkCairoContext that is currently drawing

-> m (Maybe Context)

Returns: a Cairo context to draw on `GdkSurface

Deprecated: (Since version 4.18)Drawing content with Cairo should be done viaCairo rendernodes, not by using renderers.

Retrieves a Cairo context to be used to draw on the GdkSurface of context.

A call to drawContextBeginFrame with this context must have been done or this function will return Nothing.

The returned context is guaranteed to be valid until drawContextEndFrame is called.