[Kst] kdeextragear-2/kst/kst
Andrew Walker
arwalker at sumusltd.com
Tue Jul 20 20:36:31 CEST 2004
CVS commit by arwalker:
More efficiencies.
M +2 -4 kst2dplot.cpp 1.161
--- kdeextragear-2/kst/kst/kst2dplot.cpp #1.160:1.161
@@ -1210,6 +1210,5 @@ void Kst2DPlot::draw(QPainter &p, double
/* x axis numbers */
TickLabel->setJustification(CxTy);
- for (i = -1; xtick_px * i + x_orig_px > xleft_bdr_px - 1; i--);
- i++;
+ i = (int)ceil( ( xleft_bdr_px - 1.0 - x_orig_px ) / xtick_px );
for (; xtick_px * i + x_orig_px < x_px - xright_bdr_px + 1; i++) {
genAxisTikLabel(TmpStr, i * XTick + Xorg, _xLog);
@@ -1221,6 +1220,5 @@ void Kst2DPlot::draw(QPainter &p, double
/* y axis numbers */
TickLabel->setJustification(RxCy);
- for (i = -1; ytick_px * i + y_orig_px > ytop_bdr_px - 1; i--);
- i++;
+ i = (int)ceil( ( ytop_bdr_px - 1.0 - y_orig_px ) / ytick_px );
for (; ytick_px * i + y_orig_px < y_px - ybot_bdr_px + 1; i++) {
genAxisTikLabel(TmpStr, -(i*YTick) + Yorg, _yLog);
More information about the Kst
mailing list