[Kst] kdeextragear-2/kst/kst
Rick Chern
rchern at interchange.ubc.ca
Fri Aug 6 22:23:27 CEST 2004
CVS commit by rchern:
Plot images before axis tick marks
M +17 -16 kst2dplot.cpp 1.211
--- kdeextragear-2/kst/kst/kst2dplot.cpp #1.210:1.211
@@ -1457,6 +1457,4 @@ void Kst2DPlot::draw(QPainter &p, KstPai
}
- p.setPen(QPen(_foregroundColor, penWidth));
-
setTicks(XTick, Xorg, x_max, x_min, _xLog);
setTicks(YTick, Yorg, y_max, y_min, _yLog);
@@ -1500,4 +1498,19 @@ void Kst2DPlot::draw(QPainter &p, KstPai
d2i(y_px - XLabel->lineSpacing(p) - ytop_bdr_px));
+ Lx = (double)xleft_bdr_px + 1;
+ Hx = (double)(x_px - xright_bdr_px - 1);
+ Ly = (double)ytop_bdr_px + 1;
+ Hy = (double)(y_px - ybot_bdr_px - 1);
+ m_X = (Hx - Lx)/(x_max - x_min);
+ m_Y = (Ly - Hy)/(y_max - y_min);
+ b_X = Lx - m_X * x_min;
+ b_Y = Hy - m_Y * y_min;
+
+ //plot the images before axes
+ plotImages(p, Lx, Hx, Ly, Hy, m_X, m_Y, b_X, b_Y,
+ x_max, y_max, x_min, y_min);
+
+ p.setPen(QPen(_foregroundColor, penWidth));
+
/******************************************************************/
/* Draw the axis and labels */
@@ -1666,12 +1679,4 @@ void Kst2DPlot::draw(QPainter &p, KstPai
}
- Lx = (double)xleft_bdr_px + 1;
- Hx = (double)(x_px - xright_bdr_px - 1);
- Ly = (double)ytop_bdr_px + 1;
- Hy = (double)(y_px - ybot_bdr_px - 1);
- m_X = (Hx - Lx)/(x_max - x_min);
- m_Y = (Ly - Hy)/(y_max - y_min);
- b_X = Lx - m_X * x_min;
- b_Y = Hy - m_Y * y_min;
if (type != P_PRINT && type != P_EXPORT) {
_m_X = m_X;
@@ -1681,8 +1686,4 @@ void Kst2DPlot::draw(QPainter &p, KstPai
}
- //plot the images
- plotImages(p, Lx, Hx, Ly, Hy, m_X, m_Y, b_X, b_Y,
- x_max, y_max, x_min, y_min);
-
/*** plot the legend now if its in the background **/
if (!Legend->getFront()) {
@@ -4370,5 +4371,5 @@ void Kst2DPlot::plotImages(QPainter& p,
//draw the contourmap
if (image->hasContourMap()) {
- p.setPen(image->contourColor());
+ p.setPen(QPen(image->contourColor(), 0));
//do the drawing
for (int i = d2i(ceil(img_Lx_pix)); i + CONTOUR_STEP < d2i(floor(img_Hx_pix)); i += CONTOUR_STEP) {
@@ -4427,5 +4428,5 @@ void Kst2DPlot::plotImages(QPainter& p,
rightPoint.setX(i+CONTOUR_STEP);
}
-
+ //now draw the lines connecting points
if (numPoints == 4) {
//draw a cross
More information about the Kst
mailing list