X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2FPainter.C;h=94943ff9579a0a293bc8e9fd18a0fb9744eb0569;hb=7c095d4330fc264a6c443ed83ff1bbe1d22c69db;hp=5836bf50ac244ebe210ae754eadb8efc0933306a;hpb=e7401bd8f2310213b4b765c01676459f37adb530;p=lyx.git diff --git a/src/Painter.C b/src/Painter.C index 5836bf50ac..94943ff957 100644 --- a/src/Painter.C +++ b/src/Painter.C @@ -33,6 +33,8 @@ #include "lyxrc.h" #include "encoding.h" +#include "frontends/support/LyXImage.h" + using std::endl; using std::max; @@ -235,7 +237,6 @@ PainterBase & Painter::segments(int const * x1, int const * y1, return *this; } - PainterBase & Painter::pixmap(int x, int y, int w, int h, Pixmap bitmap) { if (lyxerr.debugging(Debug::GUI)) { @@ -244,7 +245,7 @@ PainterBase & Painter::pixmap(int x, int y, int w, int h, Pixmap bitmap) "workarea::workhandler\n"; lyxerr << "Painter drawable: " << owner.getPixmap() << endl; } - + XGCValues val; val.function = GXcopy; GC gc = XCreateGC(display, owner.getPixmap(), @@ -255,6 +256,13 @@ PainterBase & Painter::pixmap(int x, int y, int w, int h, Pixmap bitmap) return *this; } +PainterBase & Painter::image(int x, int y, int w, int h, LyXImage const * image) +{ + Pixmap bitmap = image->getPixmap(); + + return pixmap(x, y, w, h, bitmap); +} + PainterBase & Painter::text(int x, int y, string const & s, LyXFont const & f) {