logo

const class

fwt::Point

sys::Obj
  fwt::Point

Point represents a coordinate in the display space.

Slots

def

static Point def := Point.?()

Default instance is 0, 0.

Source

equals

override Bool equals(Obj obj)

Return if obj is same Point value.

Source

fromStr

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

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

Source

hash

override Int hash()

Return hash of x and y.

Source

make

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

Construct with optional x, y.

Source

toStr

override Str toStr()

Return "x,y"

Source

translate

Point translate(Point t)

Return x+tx, y+ty

Source

x

const Int x

X coordinate

Source

y

const Int y

Y coordinate

Source