Rect

Rectangle representation based on pixels

Constructors

Link copied to clipboard
constructor()
constructor(address: Long)
constructor(left: Number = 0, top: Number = 0, right: Number = 0, bottom: Number = 0)
constructor(pos: Xy, size: Size)
constructor(topLeft: Xy, botRight: Xy)

Properties

Link copied to clipboard

Address of native referenced object. nullptr if not referencing any native allocated object. Note native allocation will happen only once.

Link copied to clipboard
val bottom: Int

Return the lowest y coordinate (bottom side) of the rectangle.

Link copied to clipboard
val center: Xy?

Returns the center of the rectangle

Link copied to clipboard

Returns the dimensions of the rectangle

Link copied to clipboard
var height: Int

Viewport height, in pixels.from top edge of screen.

Link copied to clipboard
val left: Int

Return the leftmost x coordinate (left side) of the rectangle.

Link copied to clipboard
val right: Int

Return the rightmost x coordinate (right side) of the rectangle.

Link copied to clipboard
val top: Int

Return the highest y coordinate (top side) of the rectangle.

Link copied to clipboard
var width: Int

Viewport width, in pixels.from top edge of screen.

Link copied to clipboard
var x: Int

Horizontal offset of viewport from left edge of screen.

Link copied to clipboard
var y: Int

Vertical offset of viewport from top edge of screen.

Functions

Link copied to clipboard
fun finalize()

Overrides finalize that garbage collector will call when needed.

Link copied to clipboard
external fun inflate(dx: Int, dy: Int)

Expand viewport by adding 2dx to its width and 2dy to its height, while leaving its center unmoved.

Link copied to clipboard
external fun isEmpty(): Boolean

Returns true if all 4 sides of the rectangle are set to zero.

Link copied to clipboard

True if keeps a reference to a C++ SDK object False if keeps a C++ SDK object

Link copied to clipboard
operator fun not(): Boolean

Checks if this object is valid.

Link copied to clipboard
external fun pointInRectangle(xy: Xy): Boolean

Check if XY position is inside rectangle

Link copied to clipboard
fun release()

Releases the native referenced value of this object if:

Link copied to clipboard
fun toRectF(): RectF

Converts this to RectF