Cartesian Class
The Cartesian class is a means to bundle Axis objects and provides neat accessors to calculate pixel/coord of two Axis objects at a time, a x-axis and a y-axis.
Constructor
Cartesian
()
Methods
addx
(
-
name
-
min
-
max
-
pxmin
-
pxmax
Add an x-axis to the cartesian instance.
addy
(
-
name
-
min
-
max
-
pxmin
-
pxmax
Add an y-axis to the cartesian instance.
coord
(
Object
-
namex
-
namey
-
px
-
py
Get coord for a given (px, py) pixel value (not rounded).
Parameters:
Returns:
Object:
Object with x and y property
coordx
(
Number
-
namex
-
x
Get coordinate value for a given pixel (not rounded) on the x-axis.
Parameters:
Returns:
coordy
(
Number
-
namey
-
y
Get coordinate value for a given pixel (not rounded) on the y-axis.
Parameters:
Returns:
invert
(
-
name
Invert the axis (swap minimum for maximum)
Parameters:
-
name
StringName of axis to invert
pixel
(
Object
-
namex
-
namey
-
x
-
y
Get pixel value for a given (x, y) coord (not rounded).
Parameters:
Returns:
Object:
Object with x and y property
px
(
Number
-
namex
-
x
Get pixel value for a given coord (not rounded) on x-axis.