v2025.6.2
All Bundles

Position

Shape position

Operations

AddX

Increments the current x-position

method : public : AddX(x:Int) ~ Nil

Parameters

NameTypeDescription
xIntincrement to the current x-position

AddY

Increments the current y-position

method : public : AddY(y:Int) ~ Nil

Parameters

NameTypeDescription
yIntincrement to the current y-position

Contains

Determines if position a point

method : public : Contains(p:Point) ~ Bool

Parameters

NameTypeDescription
pPointpoint

Return

TypeDescription
Booltrue of intersection, false otherwise

Contains

Determines if position a point

method : public : Contains(x:Int, y:Int) ~ Bool

Parameters

NameTypeDescription
xIntx-position
yInty-position

Return

TypeDescription
Booltrue of intersection, false otherwise

Distance

Calculates the distance between two points

method : private : Distance(x:Int, y:Int) ~ Int

Parameters

NameTypeDescription
xIntx-position
yInty-position

Return

TypeDescription
Intdistance between the two points

Distance

Calculates the distance between two points

method : private : Distance(pos:Position) ~ Int

Parameters

NameTypeDescription
posPositionposition

Return

TypeDescription
Intdistance between the two points

GetBottom

Gets bottom position

method : public : GetBottom() ~ Int

Return

TypeDescription
Intbottom position

GetCenterX

Gets the center x-position

method : public : GetCenterX() ~ Int

Return

TypeDescription
Intcenter x-position

GetCenterY

Gets the center y-position

method : public : GetCenterY() ~ Int

Return

TypeDescription
Intcenter y-position

GetLeft

Gets left position

method : public : GetLeft() ~ Int

Return

TypeDescription
Intleft position

GetRect

Gets bounding size

method : public : GetRect() ~ Rect

Return

TypeDescription
Rectsize and rectangle

GetRight

Gets right position

method : public : GetRight() ~ Int

Return

TypeDescription
Intright position

GetTop

Gets top position

method : public : GetTop() ~ Int

Return

TypeDescription
Inttop position

IntersectsLine

Determines if position intersect line

method : public : IntersectsLine(x1:Int, y1:Int, x2:Int, y2:Int) ~ Bool

Parameters

NameTypeDescription
x1Int'x' start position
y1Int'y' start position
x2Int'x' end position
y2Int'y' end position

Return

TypeDescription
Booltrue of intersection, false otherwise

IntersectsPoint

Determines if position intersect point

method : public : IntersectsPoint(x:Int, y:Int) ~ Bool

Parameters

NameTypeDescription
xInt'x' start position
yInt'y' start position

Return

TypeDescription
Booltrue of intersection, false otherwise

IntersectsPoint

Determines if position intersect point

method : public : IntersectsPoint(p:Point) ~ Bool

Parameters

NameTypeDescription
pPointpoint position

Return

TypeDescription
Booltrue of intersection, false otherwise

New

Creates a new rectangle with given size

New(rect:Rect)

Parameters

NameTypeDescription
rectRectposition

New

Creates a new rectangle with given position and size

New(x:Int, y:Int, w:Int, h:Int)

Parameters

NameTypeDescription
xIntx-position
yInty-position
wIntwidth
hIntheight

New

Creates a new rectangle with given size

New(w:Int, h:Int)

Parameters

NameTypeDescription
wIntwidth
hIntheight

Overlaps

Determines if position overlaps rectangle

method : public : native : Overlaps(pos:Position) ~ Bool

Parameters

NameTypeDescription
posPositionposition to test

Return

TypeDescription
Booltrue of overlap, false otherwise

Set

Set upper left position

method : public : Set(x:Int, y:Int) ~ Nil

Parameters

NameTypeDescription
xIntx-position
yInty-position

SetBottom

Sets bottom position

method : public : SetBottom(y2:Int) ~ Nil

Parameters

NameTypeDescription
y2Intbottom position

SetCenter

Set center position

method : public : SetCenter(x:Int, y:Int) ~ Nil

Parameters

NameTypeDescription
xIntx-position
yInty-position

SetCenterX

Set center x-position

method : public : SetCenterX(x:Int) ~ Nil

Parameters

NameTypeDescription
xIntx-position

SetCenterY

Set center y-position

method : public : SetCenterY(y:Int) ~ Nil

Parameters

NameTypeDescription
yInty-position

SetLeft

Sets left position

method : public : SetLeft(x:Int) ~ Nil

Parameters

NameTypeDescription
xIntx-position

SetRight

Sets right position

method : public : SetRight(x2:Int) ~ Nil

Parameters

NameTypeDescription
x2Intright position

SetTop

Sets top position

method : public : SetTop(y:Int) ~ Nil

Parameters

NameTypeDescription
yInttop position