Skip to content

API Reference / @gtkx/cairo / Rectangle

Class: Rectangle ​

Defined in: structs.d.ts:40

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

Constructors ​

Constructor ​

new Rectangle(props?): Rectangle

Defined in: structs.d.ts:44

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

Parameters ​

props? ​

RectangleConstructorProps

Returns ​

Rectangle

Properties ​

__type__ ​

__type__: bigint

Defined in: structs.d.ts:42

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

Accessors ​

height ​

Get Signature ​

get height(): number

Defined in: structs.d.ts:58

Height of the rectangle.

Returns ​

number

Set Signature ​

set height(value): void

Defined in: structs.d.ts:60

Height of the rectangle.

Parameters ​
value ​

number

Returns ​

void


width ​

Get Signature ​

get width(): number

Defined in: structs.d.ts:54

Width of the rectangle.

Returns ​

number

Set Signature ​

set width(value): void

Defined in: structs.d.ts:56

Width of the rectangle.

Parameters ​
value ​

number

Returns ​

void


x ​

Get Signature ​

get x(): number

Defined in: structs.d.ts:46

Horizontal position of the left edge.

Returns ​

number

Set Signature ​

set x(value): void

Defined in: structs.d.ts:48

Horizontal position of the left edge.

Parameters ​
value ​

number

Returns ​

void


y ​

Get Signature ​

get y(): number

Defined in: structs.d.ts:50

Vertical position of the top edge.

Returns ​

number

Set Signature ​

set y(value): void

Defined in: structs.d.ts:52

Vertical position of the top edge.

Parameters ​
value ​

number

Returns ​

void