diff options
author | scuri <scuri> | 2009-12-01 20:33:02 +0000 |
---|---|---|
committer | scuri <scuri> | 2009-12-01 20:33:02 +0000 |
commit | 837b9b863299bd05b5348b47f9c028091c70de61 (patch) | |
tree | cc64af440937937ca8e3d70e04e357ee29527a24 /src/cd.c | |
parent | a70ccabdeb03fa5c6a2b1a594202659a7ebacd33 (diff) |
New: function CanvasYAxisMode to control the Y axis orientation.
Diffstat (limited to 'src/cd.c')
-rw-r--r-- | src/cd.c | 16 |
1 files changed, 15 insertions, 1 deletions
@@ -586,6 +586,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); @@ -609,7 +623,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); |