Constructor
new Point(x, yopt)
Point constructor
| Name | Type | Attributes | Description |
|---|---|---|---|
x | number | | When | |
y | number | <optional> | Not used when |
Members
x :number
- number
y :number
- number
Methods
clone() → {module:AWT.Point}
Clones this point
- Type:
- module:AWT.
Point
distanceTo(point) → {number}
Calculates the distance between two points
| Name | Type | Description |
|---|---|---|
point | module:AWT. | The Point to calculate the distance against to |
- The distance between the two points.
- Type:
- number
equals(p) → {boolean}
Checks if two points are at the same place
| Name | Type | Description |
|---|---|---|
p | module:AWT. | The Point to check against to |
- Type:
- boolean
getAttributes() → {object}
Gets a object with the basic attributes needed to rebuild this instance excluding functions,
parent references, constants and also attributes retaining the default value.
The resulting object is commonly usued to serialize elements in JSON format.
- The resulting object, with minimal attrributes
- Type:
- object
moveBy(delta) → {module:AWT.Point}
Moves this Point to a new position, by a specified displacement
| Name | Type | Description |
|---|---|---|
delta | Point | | The amount to move |
- Type:
- module:AWT.
Point
moveTo(newPos, yopt) → {module:AWT.Point}
Moves this Point to a new position
| Name | Type | Attributes | Description |
|---|---|---|---|
newPos | number | | The new position, or a x coordinate | |
y | number | <optional> |
|
- Type:
- module:AWT.
Point
multBy(delta) → {module:AWT.Point}
Multiplies the x and y coordinates by a specified delta
| Name | Type | Description |
|---|---|---|
delta | Point | | The amount to multiply by. |
- Type:
- module:AWT.
Point
setAttributes(data) → {module:AWT.Point}
Reads the properties of this Point from a data object
| Name | Type | Description |
|---|---|---|
data | object | The data object to be parsed |
- Type:
- module:AWT.
Point
setProperties($xml) → {module:AWT.Point}
Reads the properties of this Point from an XML element
| Name | Type | Description |
|---|---|---|
$xml | external:jQuery | The xml element to be parsed |
- Type:
- module:AWT.
Point