Point Class
Bing
This class is used to represent a pixel coordinate or offset. This is often used by pushpin anchors, and map location to pixel conversion calculations.
Point(x: number, y: number)
| Name | Type | Description |
|---|---|---|
x | number | The x value of the point. |
y | number | The y value of the point. |
The following is a list of methods that are part of the Point class.
| Name | Return Type | Description |
|---|---|---|
add(point: Point) | Point | Adds the x and y values of two points and returns a new Point. |
clone() | Point | Returns a copy of the Point object. |
equals(point: Point, tolerance?: number) | boolean | Compares the x and y values of two points to see if they are equal. If a tolerance value is specified, it checks to see if the linear distance between the points is less than or equal to the tolerance value. |
subtract(point: Point) | Point | Subtracts the x and y values of a points and returns a new Point. |
toString() | string | Converts the Point object into a string. |
Show: