logo

const class

fwt::Rect

sys::Obj
  fwt::Rect

Represents the x,y coordinate and w,h size of a rectangle.

Slots

def

static Rect def := Rect.?()

Default instance is 0, 0, 0, 0.

Source

equals

override Bool equals(Obj obj)

Return if obj is same Rect value.

Source

fromStr

static Rect fromStr(Str s, Bool checked := true)

Parse from string. If invalid and checked is true then throw ParseErr otherwise return null.

Source

h

const Int h

Height

Source

hash

override Int hash()

Return hash of x, y, w, and h.

Source

make

new make(Int x := 0, Int y := 0, Int w := 0, Int h := 0)

Construct with optional x, y, w, h.

Source

pos

Point pos()

Get the x, y coordinate of this rectangle.

Source

size

Size size()

Get the w, h size of this rectangle.

Source

toStr

override Str toStr()

Return "x,y,w,h"

Source

w

const Int w

Width

Source

x

const Int x

X coordinate

Source

y

const Int y

Y coordinate

Source