From 837b9b863299bd05b5348b47f9c028091c70de61 Mon Sep 17 00:00:00 2001
From: scuri
int cdCanvasYAxisMode(cdCanvas* canvas, int invert); [in C]
+
+canvas:YAxisMode(invert: number) -> (old_invert: number) [in Lua]
+
+ Controls the orientation of the Y axis. Internally in some drivers the + native axis orientation is top-bottom, so the CD primitives must invert the + Y axis since the CD orientation is bottom-top. Using CD_QUERY will return + the current Y axis mode, if needs to be invert or not. Using 1 or 0 you can + control if the Y axis should be inverted or not independent from the native + orientation, with that you can in fact invert the orientation of the CD + primitives.
+int cdCanvasUpdateYAxis(cdCanvas* canvas, int *y); [in C]
double cdfCanvasUpdateYAxis(cdCanvas* canvas, double *y); [in C]
int cdCanvasInvertYAxis(cdCanvas* canvas, int y); [in C]
@@ -26,11 +38,9 @@ double cdfCanvasInvertYAxis(cdCanvas* canvas, double y); [in C]
canvas:UpdateYAxis(yc: number) -> (yr: number) [in Lua]
canvas:InvertYAxis(yc: number) -> (yr: number) [in Lua]
- In some graph systems, the origin is at the upper left corner of the
- canvas, with the direction of the Y axis pointing down. In this case, the
- function converts the coordinate system of the CD library into the internal
- system of the active canvas' driver, and the other way round. If this is not
- the case, nothing happens. This is just "y = height-1 -
+ Converts the coordinate system of the CD library into the internal
+ system of the active canvas' driver, and the other way round, if they are
+ invert, or else do nothing. This is just "y = height-1 -
y". It returns the changed value. The "Invert" will always invert
the given value, the "Update" function will invert only if the canvas has the
Y axis inverted.