X-Git-Url: http://git.kpe.io/?p=ctsim.git;a=blobdiff_plain;f=libctgraphics%2Fezplot.cpp;h=267ad1509d2f3e8b4b0108088a730280b5f07ec9;hp=79a4ebbb908c226babb1f72f2e54e03b16d0a328;hb=8a7697ce57b56cdc43698cd1241ad98d49f9b5ac;hpb=b361677a2f7d5b443641faec70b057f2a84dc77e diff --git a/libctgraphics/ezplot.cpp b/libctgraphics/ezplot.cpp index 79a4ebb..267ad15 100644 --- a/libctgraphics/ezplot.cpp +++ b/libctgraphics/ezplot.cpp @@ -6,7 +6,7 @@ ** This is part of the CTSim program ** Copyright (c) 1983-2001 Kevin Rosenberg ** -** $Id: ezplot.cpp,v 1.32 2001/03/10 23:14:16 kevin Exp $ +** $Id$ ** ** This program is free software; you can redistribute it and/or modify ** it under the terms of the GNU General Public License (version 2) as @@ -868,7 +868,6 @@ EZPlot::plot (SGP* pSGP) if (y >= ygn_min && y <= ygn_max) { m_pSGP->moveAbs (x, y); symbol (iSym, symwidth, symheight); - } } } @@ -1102,11 +1101,12 @@ EZPlot::symbol (int sym, double symwidth, double symheight) return; if (sym == SB_CROSS) { - m_pSGP->moveRel (-0.5 * symwidth, -0.5 * symheight); - m_pSGP->lineRel (symwidth, symheight); - m_pSGP->moveRel (-symwidth, 0.0); - m_pSGP->lineRel (symwidth, -symheight); - m_pSGP->moveRel (-0.5 * symwidth, 0.5 * symheight); + m_pSGP->markerRel (0, 0); +// m_pSGP->moveRel (-0.5 * symwidth, -0.5 * symheight); +// m_pSGP->lineRel (symwidth, symheight); +// m_pSGP->moveRel (-symwidth, 0.0); +// m_pSGP->lineRel (symwidth, -symheight); +// m_pSGP->moveRel (-0.5 * symwidth, 0.5 * symheight); } else if (sym == SB_PLUS) { m_pSGP->moveRel (-0.5 * symwidth, 0.0); m_pSGP->lineRel (symwidth, 0.0); @@ -1234,7 +1234,7 @@ loop: */ static inline double -trunc (double x) +my_trunc (double x) { double integer; @@ -1265,7 +1265,7 @@ EZPlot::make_numfmt (char *fmtstr, int *fldwid, int *nfrac, double minval, doubl if (*nfrac < 0) { // calculate frac delta /= pow (10., floor(logt)); // scale delta - frac = static_cast(fabs(trunc(log10(delta)))) + 1; + frac = static_cast(fabs(my_trunc(log10(delta)))) + 1; if (frac < 1) frac = 1; // to be safe, add decimal pt } else // use users' frac @@ -1276,7 +1276,7 @@ EZPlot::make_numfmt (char *fmtstr, int *fldwid, int *nfrac, double minval, doubl ++wid; sprintf (fmtstr, "%s%d%s%d%s", "%", wid, ".", frac, "g"); } else { // use fixed format - wid = static_cast(trunc(logt)) + 1; + wid = static_cast(my_trunc(logt)) + 1; if (wid < 1) wid = 1; if (minval < 0. || maxval < 0.) @@ -1286,7 +1286,7 @@ EZPlot::make_numfmt (char *fmtstr, int *fldwid, int *nfrac, double minval, doubl if (delta >= 0.999999) frac = 1; // add a decimal pt to be safe else - frac = static_cast(fabs(trunc(log10(delta)))) + 1; + frac = static_cast(fabs(my_trunc(log10(delta)))) + 1; } else // use users' frac frac = *nfrac;