another fix for axis ticks.

This commit is contained in:
Martin Preuss
2026-01-04 15:39:09 +01:00
parent 7d139093df
commit 8bafc714c3

View File

@@ -55,6 +55,7 @@
<inline loc="code"> <inline loc="code">
<content> <content>
static int _genLog10TicksUp($(struct_type) *st, \n static int _genLog10TicksUp($(struct_type) *st, \n
double vStart, \n
double vStep, \n double vStep, \n
double vBegin, double vEnd, \n double vBegin, double vEnd, \n
int level, \n int level, \n
@@ -64,7 +65,7 @@
GWEN_BUFFER *dbuf; \n GWEN_BUFFER *dbuf; \n
\n \n
dbuf=GWEN_Buffer_new(0, 256, 0, 1); \n dbuf=GWEN_Buffer_new(0, 256, 0, 1); \n
vRun=vBegin; \n vRun=vStart; \n
while(vRun&lt;=vEnd) { \n while(vRun&lt;=vEnd) { \n
if (vRun&gt;=vBegin) { \n if (vRun&gt;=vBegin) { \n
if (!$(struct_prefix)_HasTickValue(st, vRun)) { \n if (!$(struct_prefix)_HasTickValue(st, vRun)) { \n
@@ -86,6 +87,7 @@
<inline loc="code"> <inline loc="code">
<content> <content>
static int _genLog10TicksDown($(struct_type) *st, \n static int _genLog10TicksDown($(struct_type) *st, \n
double vStart, \n
double vStep, \n double vStep, \n
double vBegin, double vEnd, \n double vBegin, double vEnd, \n
int level, \n int level, \n
@@ -95,7 +97,7 @@
GWEN_BUFFER *dbuf; \n GWEN_BUFFER *dbuf; \n
\n \n
dbuf=GWEN_Buffer_new(0, 256, 0, 1); \n dbuf=GWEN_Buffer_new(0, 256, 0, 1); \n
vRun=vBegin; \n vRun=vStart; \n
while(vRun&gt;=vEnd) { \n while(vRun&gt;=vEnd) { \n
if (vRun&lt;=vBegin) { \n if (vRun&lt;=vBegin) { \n
if (!$(struct_prefix)_HasTickValue(st, vRun)) { \n if (!$(struct_prefix)_HasTickValue(st, vRun)) { \n
@@ -126,14 +128,14 @@
if (vMin&lt;0.0 && vMax&gt;=0.0) { \n if (vMin&lt;0.0 && vMax&gt;=0.0) { \n
int rv; \n int rv; \n
\n \n
rv=_genLog10TicksUp(st, vStep, 0.0, vMax, level, precision); \n rv=_genLog10TicksUp(st, 0.0, vStep, 0.0, vMax, level, precision); \n
rv|=_genLog10TicksDown(st, vStep, 0.0, vMin, level, precision); \n rv|=_genLog10TicksDown(st, 0.0, vStep, 0.0, vMin, level, precision); \n
return rv; \n return rv; \n
} \n } \n
else if (vMin&lt;0.0 && vMax&lt;=0.0) \n else if (vMin&lt;0.0 && vMax&lt;=0.0) \n
return _genLog10TicksDown(st, vStep, vStart, vMin, level, precision); \n return _genLog10TicksDown(st, vStart, vStep, vMax, vMin, level, precision); \n
else \n else \n
return _genLog10TicksUp(st, vStep, vStart, vMax, level, precision); \n return _genLog10TicksUp(st, vStart, vStep, vMin, vMax, level, precision); \n
} \n } \n
</content> </content>
</inline> </inline>