summaryrefslogtreecommitdiff
path: root/cd/src/cd.c
diff options
context:
space:
mode:
Diffstat (limited to 'cd/src/cd.c')
-rwxr-xr-xcd/src/cd.c20
1 files changed, 17 insertions, 3 deletions
diff --git a/cd/src/cd.c b/cd/src/cd.c
index c2045a8..600a1a9 100755
--- a/cd/src/cd.c
+++ b/cd/src/cd.c
@@ -18,8 +18,8 @@
#include "cdirgb.h"
/* This appears only here to avoid changing the cd.h header fo bug fixes */
-#define CD_VERSION_FIX ".1"
-#define CD_VERSION_FIX_NUMBER 1
+#define CD_VERSION_FIX ""
+#define CD_VERSION_FIX_NUMBER 0
const char cd_ident[] =
"$CD: " CD_VERSION CD_VERSION_FIX " " CD_COPYRIGHT " $\n"
@@ -572,6 +572,20 @@ void cdCanvasClear(cdCanvas* canvas)
canvas->cxClear(canvas->ctxcanvas);
}
+int cdCanvasYAxisMode(cdCanvas* canvas, int invert)
+{
+ int old_invert_yaxis;
+ assert(canvas);
+ if (!_cdCheckCanvas(canvas)) return CD_ERROR;
+
+ if (invert == CD_QUERY)
+ return canvas->invert_yaxis;
+
+ old_invert_yaxis = canvas->invert_yaxis;
+ canvas->invert_yaxis = invert;
+ return old_invert_yaxis;
+}
+
int cdCanvasUpdateYAxis(cdCanvas* canvas, int* y)
{
assert(canvas);
@@ -595,7 +609,7 @@ double cdfCanvasUpdateYAxis(cdCanvas* canvas, double* y)
assert(y);
if (!_cdCheckCanvas(canvas)) return CD_ERROR;
- if(canvas->invert_yaxis)
+ if (canvas->invert_yaxis)
{
*y = _cdInvertYAxis(canvas, *y);