Table of Contents

Class DrawContext

Namespace
Gdk
Assembly
Gdk-4.0.dll
public class DrawContext : Object, IDisposable, NativeObject, GTypeProvider, InstanceFactory
Inheritance
DrawContext
Implements
Derived
Inherited Members

Constructors

DrawContext(params ConstructArgument[])

[Obsolete("Regular C# constructors on native classes will be removed in a future version. Please see the linked documentation for more details. It contains scenarios and possible solutions to prepare for the upcoming changes.", DiagnosticId = "GirCore1007", UrlFormat = "https://gircore.github.io/docs/integration/diagnostic/1007.html")]
public DrawContext(params ConstructArgument[] constructArguments)

Parameters

constructArguments ConstructArgument[]

DrawContext(CreationData)

[Obsolete("This constructor is a workaround to keep legacy APIs alive. Do not use it.")]
protected DrawContext(CreationData data)

Parameters

data CreationData

DrawContext(DrawContextHandle)

protected DrawContext(DrawContextHandle handle)

Parameters

handle DrawContextHandle

Fields

DisplayPropertyDefinition

public static readonly Property<Display?, DrawContext> DisplayPropertyDefinition

Field Value

Property<Display, DrawContext>

SurfacePropertyDefinition

public static readonly Property<Surface?, DrawContext> SurfacePropertyDefinition

Field Value

Property<Surface, DrawContext>

Properties

Display

public Display? Display { get; }

Property Value

Display

Surface

public Surface? Surface { get; }

Property Value

Surface

Methods

BeginFrame(Region)

public void BeginFrame(Region region)

Parameters

region Region

EndFrame()

public void EndFrame()

GetDisplay()

public Display? GetDisplay()

Returns

Display

GetFrameRegion()

public Region? GetFrameRegion()

Returns

Region

GetGType()

public static Type GetGType()

Returns

Type

GetSurface()

public Surface? GetSurface()

Returns

Surface

IsInFrame()

public bool IsInFrame()

Returns

bool

NewFromPointer(nint, bool)

Creates a new managed DrawContext instance for a given pointer.

public static DrawContext NewFromPointer(nint ptr, bool ownsHandle)

Parameters

ptr nint
ownsHandle bool

Returns

DrawContext

NewWithProperties(ConstructArgument[])

Creates a new DrawContext and sets the properties specified by the construct arguments.

public static DrawContext NewWithProperties(ConstructArgument[] constructArguments)

Parameters

constructArguments ConstructArgument[]

The properties to set.

Returns

DrawContext