Table of Contents

Class PrintContext

Namespace
Gtk
Assembly
Gtk-4.0.dll
public class PrintContext : Object, IDisposable, NativeObject, GTypeProvider, InstanceFactory
Inheritance
PrintContext
Implements
Inherited Members

Constructors

PrintContext(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 PrintContext(params ConstructArgument[] constructArguments)

Parameters

constructArguments ConstructArgument[]

PrintContext(CreationData)

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

Parameters

data CreationData

PrintContext(PrintContextHandle)

protected PrintContext(PrintContextHandle handle)

Parameters

handle PrintContextHandle

Methods

CreatePangoContext()

public Context CreatePangoContext()

Returns

Context

CreatePangoLayout()

public Layout CreatePangoLayout()

Returns

Layout

GetCairoContext()

public Context GetCairoContext()

Returns

Context

GetDpiX()

public double GetDpiX()

Returns

double

GetDpiY()

public double GetDpiY()

Returns

double

GetGType()

public static Type GetGType()

Returns

Type

GetHardMargins(out double, out double, out double, out double)

public bool GetHardMargins(out double top, out double bottom, out double left, out double right)

Parameters

top double
bottom double
left double
right double

Returns

bool

GetHeight()

public double GetHeight()

Returns

double

GetPageSetup()

public PageSetup GetPageSetup()

Returns

PageSetup

GetPangoFontmap()

public FontMap GetPangoFontmap()

Returns

FontMap

GetWidth()

public double GetWidth()

Returns

double

NewFromPointer(nint, bool)

Creates a new managed PrintContext instance for a given pointer.

public static PrintContext NewFromPointer(nint ptr, bool ownsHandle)

Parameters

ptr nint
ownsHandle bool

Returns

PrintContext

NewWithProperties(ConstructArgument[])

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

public static PrintContext NewWithProperties(ConstructArgument[] constructArguments)

Parameters

constructArguments ConstructArgument[]

The properties to set.

Returns

PrintContext

SetCairoContext(Context, double, double)

public void SetCairoContext(Context cr, double dpiX, double dpiY)

Parameters

cr Context
dpiX double
dpiY double