On Tuesday 16 July 2002 3:50 pm, Jean-Marc Lasgouttes wrote: > >>>>> "Angus" == Angus Leeming <[EMAIL PROTECTED]> writes: > > Angus> On Tuesday 16 July 2002 3:26 pm, R. Lahaye wrote: > >> Jean-Marc Lasgouttes wrote: > >>>>> "R" == R Lahaye > >> > >> <[EMAIL PROTECTED]> writes: > >> > R> I would test that right away, but GraphicsImageXPM.C is badly > >> > R> broken in CVS right now. Please fix that first: > >> > > >> > Try the following patch. > >> > > >> > grxpm.patchName: grxpm.patch > Type: text/x-patch > >> > >> Nope. Get a little further though, but now it breaks at: > >> > >> ): undefined reference to `grfx::xformsImage::getPixmap(void) > >> const' *** > > Angus> Well that's just nasty of it. The reason it does this is > Angus> because of a static_cast in xforms/XPainter.C. > > Can you enlighten me on why the cast to xformsImage is needed at all? > > JMarc
Because John and Qt don't have a Pixmap getPixmap() method. Apparently Pixmaps are X-specific and that's a limitation they can do without. If you can think of a more elegant solution, then I'm all ears. Angus Here's the QT Painter code: class QLImage : public Image { public: QPixmap const & qpixmap() const { return xformed_pixmap_; } }; Painter & QLPainter::image(int x, int y, int w, int h, grfx::Image const & i) { qp_->drawPixmap(x, y, static_cast<grfx::QLImage const &>(i).qpixmap(), 0, 0, w, h); return *this; }