CVRect - matt-s-clark/godot-gdextension-opencv GitHub Wiki

Type used to represent rectangular regions. More information here.

area

Prototype: Variant area()

Returns the area of the rect.

br

Prototype: Vector2 br()

Returns the bottom right position of the rect.

contains

Prototype: bool contains(Vector2 point)

Checks whether the rectangle contains the point.

empty

Prototype: bool empty()

True if empty.

height

Prototype: Variant height

Height of the rectangle.

width

Prototype: Variant width

Width of the rectangle.

x

Prototype: Variant x

X coordinate of the top-left corner.

y

Prototype: Variant y

Y coordinate of the top-left corner.

set_values

Prototype: void set_values(Variant x, Variant y, Variant width, Variant height)

Helper method used to quickly set rect values.

tl

Prototype: Vector2 tl()

Returns the top left position of the rect.

from_values

Prototype: static CVRect from_values(Variant x, Variant y, Variant width, Variant height)

Returns a rect with the specified values.