Represents the x,y coordinate and w,h size of a rectangle.
Slots
- containsSource
-
Return true if x,y is inside the bounds of this rectangle.
- defSource
-
static Rect def := Rect.
() Default instance is 0, 0, 0, 0.
- equalsSource
-
override Bool equals(Obj? obj)
Overrides sys::Obj.equals
Return if obj is same Rect value.
- fromStrSource
-
static Rect? fromStr(Str s, Bool checked := true)
Parse from string. If invalid and checked is true then throw ParseErr otherwise return null.
- hSource
-
const Int h
Height
- hashSource
-
override Int hash()
Overrides sys::Obj.hash
Return hash of x, y, w, and h.
- makeSource
-
new make(Int x := 0, Int y := 0, Int w := 0, Int h := 0)
Construct with optional x, y, w, h.
- makePosSizeSource
-
new makePosSize(Point p, Size s)
Construct from a Point and Size instance
- posSource
-
Point pos()
Get the x, y coordinate of this rectangle.
- sizeSource
-
Size size()
Get the w, h size of this rectangle.
- toStrSource
-
override Str toStr()
Overrides sys::Obj.toStr
Return
"x,y,w,h"
- wSource
-
const Int w
Width
- xSource
-
const Int x
X coordinate
- ySource
-
const Int y
Y coordinate