Skip to content

API Reference / @gtkx/cairo / Rectangle

Class: Rectangle ​

Defined in: packages/cairo/src/structs.ts:91

A rectangle with double-precision edges, as copyClipRectangleList and recording surfaces report.

Constructors ​

Constructor ​

new Rectangle(props?): Rectangle

Defined in: packages/cairo/src/structs.ts:100

Allocates a rectangle, writing the given fields and leaving the others at zero.

Parameters ​

props? ​

RectangleConstructorProps = {}

Returns ​

Rectangle

Properties ​

__type__ ​

__type__: bigint

Defined in: packages/cairo/src/structs.ts:97

GType of CairoRectangle, the boxed type this struct is registered under.

Accessors ​

height ​

Get Signature ​

get height(): number

Defined in: packages/cairo/src/structs.ts:140

Height of the rectangle.

Returns ​

number

Set Signature ​

set height(value): void

Defined in: packages/cairo/src/structs.ts:145

Height of the rectangle.

Parameters ​
value ​

number

Returns ​

void


width ​

Get Signature ​

get width(): number

Defined in: packages/cairo/src/structs.ts:130

Width of the rectangle.

Returns ​

number

Set Signature ​

set width(value): void

Defined in: packages/cairo/src/structs.ts:135

Width of the rectangle.

Parameters ​
value ​

number

Returns ​

void


x ​

Get Signature ​

get x(): number

Defined in: packages/cairo/src/structs.ts:110

Horizontal position of the left edge.

Returns ​

number

Set Signature ​

set x(value): void

Defined in: packages/cairo/src/structs.ts:115

Horizontal position of the left edge.

Parameters ​
value ​

number

Returns ​

void


y ​

Get Signature ​

get y(): number

Defined in: packages/cairo/src/structs.ts:120

Vertical position of the top edge.

Returns ​

number

Set Signature ​

set y(value): void

Defined in: packages/cairo/src/structs.ts:125

Vertical position of the top edge.

Parameters ​
value ​

number

Returns ​

void