+2004-05-02 Angus Leeming <leeming@lyx.org>
+
+ * QLPainter.C (image): set the background colour to
+ LColor::graphicsbg.
+
+ * QLImage.C (setPixmap_impl): remove commented out xforms code
+ to set pixmap background colour.
+
2004-05-02 Georg Baum <Georg.Baum@post.rwth-aachen.de>
* QGraphics.C: #include <cmath> (STLport compile fix for floor())
{
if (img.width() == 0 || img.height() == 0)
return img;
-
+
int const pixels = img.depth() > 8 ?
img.width() * img.height() : img.numColors();
default:
break;
}
-// FIXME
-#if 0
- unsigned int fill = packedcolor(LColor::graphicsbg);
- if (fill != image_->fill_color) {
- // the background color has changed.
- // Note that in grayscale/monochrome images the background is
- // grayed also, so this call will have no visible effect. Sorry!
- flimage_replace_pixel(image_, image_->fill_color, fill);
- image_->fill_color = fill;
- }
-#endif
return true;
}
void QLPainter::image(int x, int y, int w, int h,
lyx::graphics::Image const & i)
{
- qp_->drawPixmap(x, y, static_cast<lyx::graphics::QLImage const &>(i).qpixmap(), 0, 0, w, h);
+ lyx::graphics::QLImage const & qlimage =
+ static_cast<lyx::graphics::QLImage const &>(i);
+
+ fillRectangle(x, y, w, h, LColor::graphicsbg);
+ qp_->drawPixmap(x, y, qlimage.qpixmap(), 0, 0, w, h);
}