@jimka/typescript-ui / primitive / Point
Class: Point
Defined in: src/typescript/lib/primitive/Point.ts:10
Represents a two-dimensional point with x and y coordinates.
Extends
Constructors
new Point()
new Point(x: number, y: number): PointDefined in: src/typescript/lib/primitive/Point.ts:18
Parameters
x
number
The x coordinate.
y
number
The y coordinate.
Returns
Overrides
Methods
getClassName()
getClassName(): stringDefined in: src/typescript/lib/core/BaseObject.ts:44
Returns the runtime class name of this object.
Returns
string
The name of the constructor function as a string.
Inherited from
getId()
getId(): stringDefined in: src/typescript/lib/core/BaseObject.ts:24
Returns the unique identifier for this object.
Returns
string
The UUID string assigned at construction time.
Inherited from
getX()
getX(): numberDefined in: src/typescript/lib/primitive/Point.ts:31
Returns the x coordinate.
Returns
number
The x coordinate value, defaulting to 0 if unset.
getY()
getY(): numberDefined in: src/typescript/lib/primitive/Point.ts:40
Returns the y coordinate.
Returns
number
The y coordinate value, defaulting to 0 if unset.
render()
render(): stringDefined in: src/typescript/lib/primitive/Point.ts:49
Returns the point as a space-separated "x y" string.
Returns
string
A string of the form "<x> <y>".
setId()
setId(id: string): thisDefined in: src/typescript/lib/core/BaseObject.ts:33
Sets the unique identifier for this object.
Parameters
id
string
The new identifier string to assign.
Returns
this