Add the ability to set the background colour of an image to

LColor::graphicsbg.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@8719 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Angus Leeming 2004-05-02 11:10:22 +00:00
parent ee3c83ff49
commit ca9190c9d1
3 changed files with 14 additions and 13 deletions

View File

@ -1,3 +1,11 @@
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> 2004-05-02 Georg Baum <Georg.Baum@post.rwth-aachen.de>
* QGraphics.C: #include <cmath> (STLport compile fix for floor()) * QGraphics.C: #include <cmath> (STLport compile fix for floor())

View File

@ -197,17 +197,6 @@ bool QLImage::setPixmap_impl(Params const & params)
default: default:
break; 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; return true;
} }

View File

@ -166,7 +166,11 @@ void QLPainter::arc(int x, int y, unsigned int w, unsigned int h,
void QLPainter::image(int x, int y, int w, int h, void QLPainter::image(int x, int y, int w, int h,
lyx::graphics::Image const & i) 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);
} }