cpr.geometry.Point
Abstracts a point within a two-dimensional Cartesian coordinate system.
Index
Name |
Type |
Description |
x |
Number |
x coordinate |
y |
Number |
y coordinate |
Constructor
Create a new location object.
name |
type |
description |
x
|
Number |
x-coordinate value. |
y
|
Number |
y-coordinate value. |
Properties
Methods
Get a Point from the event.
name |
type |
description |
e
|
UIEvent |
|
coordinateoptional
|
LocationCooridnate |
default"page"
|
Coordinate system |
Get a Point from the touch event.
Compares whether the value is the same as another point.
name |
type |
description |
other
|
Point |
Another point. |
toleranceoptional
|
Number |
default0
|
tolerance. |
You get the difference from other points.
name |
type |
description |
p
|
Point |
Different points to get the difference. |
Get the distance to another point.
name |
type |
description |
p
|
Point |
Another point to get distance. |
Get a copy of the coordinates inverted relative to the origin.
I get a scaled copy object.
name |
type |
description |
xFactor
|
Number |
x-axis scale |
yFactoroptional
|
Number |
defaultundefined
|
y-axis scale, if omitted, y-axis scale value is used. |
You get a copy of the axis shifted.
name |
type |
description |
delta
|
Point |
Amount of axis travel. |
You get a copy of the axis shifted.
name |
type |
description |
delta
|
Dimension |
Amount of axis travel. |
You get a copy of the axis shifted.
name |
type |
description |
dx
|
Number |
x-axis travel amount. |
dy
|
Number |
y-axis travel amount. |
Returns a new object changed through a Dimension object.
Returns a new object that has changed through a Point object.
name |
type |
description |
d
|
Point |
|
You get a copy with the axis reversed.
Invert based on the origin.
Apply scale based on origin.
name |
type |
description |
xFactor
|
Number |
x-axis scale |
yFactoroptional
|
Number |
defaultundefined
|
The y-axis scale, if omitted, the x-axis scale value is used. |
The axis moves this coordinate by the given value.
name |
type |
description |
delta
|
Dimension |
Movement |
The axis moves this coordinate by the given value.
name |
type |
description |
delta
|
Point |
Movement |
The axis moves this coordinate by the given value.
name |
type |
description |
dx
|
Number |
x-axis travel amount. |
dy
|
Number |
y-axis travel amount. |
The position value is changed by summing the width and height of the Dimension object.
Changes the position value by summing the x,y of the Point object.
name |
type |
description |
d
|
Point |
|
Invert the x-axis and y-axis.