class

Size

@Js
@Serializable { simple=true }
const class Size : Obj

Size models the width and height of a shape.

constructors fromStr

Parse from comma or space separated string

make

Construct with w, h

makeInt

Construct with w, h as integers

fields defVal

Default instance is 0,0

h

Height

w

Width

methods equals

Return if obj is same Size value

hash

Return hash of w and h

toStr

Return "w h"

defVal const static Size : defVal

Default instance is 0,0.

equals virtual Bool equals(Obj? obj)

Return if obj is same Size value.

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

Parse from comma or space separated string. If invalid then throw ParseErr or return null based on checked flag.

h const Float : h

Height

hash virtual Int hash()

Return hash of w and h.

make new make(Float w, Float h)

Construct with w, h.

makeInt new makeInt(Int w, Int h)

Construct with w, h as integers.

toStr virtual Str toStr()

Return "w h"

w const Float : w

Width

Haxall 4.0.6 ∙ 21-Jul-2026 09:48 EDT