[Kst] kdeextragear-2/kst/kst
Rick Chern
rchern at interchange.ubc.ca
Wed Aug 18 20:17:59 CEST 2004
CVS commit by rchern:
Get rid of 1 pixel line at the top of images that falls out of image range, and get rid of strange contour lines at the top of image
M +7 -7 kst2dplot.cpp 1.230
--- kdeextragear-2/kst/kst/kst2dplot.cpp #1.229:1.230
@@ -3859,7 +3859,7 @@ void Kst2DPlot::plotImages(QPainter& p,
//*******************************************************************
if (image->hasColorMap()) {
- QImage tempImage(d2i(img_Hx_pix-img_Lx_pix), d2i(img_Hy_pix-img_Ly_pix), 32);
+ QImage tempImage(d2i(img_Hx_pix-img_Lx_pix), d2i(img_Hy_pix-img_Ly_pix - 1), 32);
for (int i=0; i < d2i(img_Hx_pix-img_Lx_pix); i++) {
- for (int j=0; j < d2i(img_Hy_pix-img_Ly_pix); j++) {
+ for (int j = 0; j < d2i(img_Hy_pix-img_Ly_pix - 1); j++) {
double new_x, new_y;
if (_xLog) {
@@ -3869,7 +3869,7 @@ void Kst2DPlot::plotImages(QPainter& p,
}
if (_yLog) {
- new_y = pow(10, (j + img_Ly_pix - b_Y) / m_Y);
+ new_y = pow(10, (j + 1 + img_Ly_pix - b_Y) / m_Y);
} else {
- new_y = (j + img_Ly_pix - b_Y) / m_Y;
+ new_y = (j + 1 + img_Ly_pix - b_Y) / m_Y;
}
QRgb rgb = image->getMappedColor(new_x, new_y);
@@ -3877,5 +3877,5 @@ void Kst2DPlot::plotImages(QPainter& p,
}
}
- p.drawImage(d2i(img_Lx_pix), d2i(img_Ly_pix), tempImage);
+ p.drawImage(d2i(img_Lx_pix), d2i(img_Ly_pix + 1), tempImage);
}
//*******************************************************************
@@ -3898,6 +3898,6 @@ void Kst2DPlot::plotImages(QPainter& p,
//get the z values
double zTL, zTR, zBL, zBR;
- double new_x_small = (i - b_X) / m_X, new_y_small = (j - b_Y) / m_Y;
- double new_x_large = (i+CONTOUR_STEP - b_X) / m_X, new_y_large = (j+CONTOUR_STEP - b_Y) / m_Y;
+ double new_x_small = (i - b_X) / m_X, new_y_small = (j +1 - b_Y) / m_Y;
+ double new_x_large = (i+CONTOUR_STEP - b_X) / m_X, new_y_large = (j+1+CONTOUR_STEP - b_Y) / m_Y;
if (_xLog) {
new_x_small = pow(10, new_x_small);
More information about the Kst
mailing list