Class adf.Point
Defined in: core.js.
Constructor Attributes | Constructor Name and Description |
---|---|
adf.Point(x, y)
A simple object used to represent a specific point in any 2-dimensional coordinate system.
|
Field Attributes | Field Name and Description |
---|---|
Represents the coordinate position in the x direction
|
|
Represents the coordinate position in the y direction
|
Method Attributes | Method Name and Description |
---|---|
equals(pt)
Checks if this point is equal to another point.
|
|
offset(oX, oY)
Returns an adf.Point instance offset by adding the parameter oX to the current x value and oY to the
current y value.
|
|
reshape(x, y)
A convenience function that sets both the x and y value.
|
|
toString()
Returns a String representation of this point in the form of
adf.Point [x = "#", y = "#"] |
Class Detail
adf.Point(x, y)
A simple object used to represent a specific point in any 2-dimensional coordinate system.
- Parameters:
- {Number} x
- {Number} y
Field Detail
{Number}
x
Represents the coordinate position in the x direction
- Default Value:
- null
{Number}
y
Represents the coordinate position in the y direction
- Default Value:
- null
Method Detail
equals(pt)
Checks if this point is equal to another point.
- Returns:
- a boolean value.
offset(oX, oY)
Returns an adf.Point instance offset by adding the parameter oX to the current x value and oY to the
current y value.
- Parameters:
- {Number} oX
- {Number} The value to offset this.x by
- {Number} oY
- {Number} The value to offset this.y by
- Returns:
- an instance of adf.Point with its x and y values equal to
this.x + oX
andthis.y + oY
respectively.
reshape(x, y)
A convenience function that sets both the x and y value. No value is returned.
- Parameters:
- {Number} x
- {Number} The value to set this.x to
- {Number} y
- {Number} The value to set this.y to
toString()
Returns a String representation of this point in the form of
adf.Point [x = "#", y = "#"]