Skip to content

API Reference / @gtkx/cairo / Device

Abstract Class: Device

Defined in: device.d.ts:6

A cairo device (cairo_device_t): the backend-specific object behind a surface, such as a GL context or an output stream. Instances come from bindings that hand one back.

Constructors

Constructor

new Device(): Device

Returns

Device

Properties

__type__

__type__: bigint

Defined in: device.d.ts:8

GType of CairoDevice, the boxed type this class is registered under.

Methods

finish()

finish(): void

Defined in: device.d.ts:14

Finishes the device, dropping its resources; further drawing through it fails.

Returns

void


flush()

flush(): void

Defined in: device.d.ts:16

Flushes any pending operations on the device.

Returns

void


getReferenceCount()

getReferenceCount(): number

Defined in: device.d.ts:18

Returns the reference count of the device.

Returns

number


getType()

getType(): DeviceType

Defined in: device.d.ts:12

Returns the backend the device belongs to.

Returns

DeviceType


status()

status(): Status

Defined in: device.d.ts:10

Returns the error status of the device, Status.SUCCESS when it is usable.

Returns

Status

Released under the MPL-2.0 License.