const virtual class vaseGraphics::Point

sys::Obj
  vaseGraphics::Point

@Js
@Serializable { simple=true }

Point represents a coordinate in the display space.

defVal

const static Point defVal := Point.<ctor>(0, 0)

Default instance is 0, 0.

equals

virtual override Bool equals(Obj? obj)

Return if obj is same Point value.

fromStr

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

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

hash

virtual override Int hash()

Return hash of x and y.

make

new make(Int x, Int y)

Construct with x, y.

toStr

virtual override Str toStr()

Return "x,y"

translate

Point translate(Point t)

Return x+tx, y+ty

x

const Int x

X coordinate

y

const Int y

Y coordinate