]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/xforms/XPainter.C
Yet more dialog tweaking from Rob.
[lyx.git] / src / frontends / xforms / XPainter.C
index 68837a7d712b6572a239628b00b2929e9a9c3eac..a40b7f2ad4639125ac56787367031cae04df8bc8 100644 (file)
@@ -1,10 +1,12 @@
 /**
  * \file XPainter.C
- * Copyright 1998-2002 the LyX Team
- * Read the file COPYING
+ * This file is part of LyX, the document processor.
+ * Licence details can be found in the file COPYING.
  *
  * \author unknown
- * \author John Levon <moz@compsoc.man.ac.uk>
+ * \author John Levon 
+ *
+ * Full author contact details are available in file CREDITS
  */
 
 #include <config.h>
 #include "encoding.h"
 #include "language.h"
 
-#include "graphics/GraphicsImage.h"
+#ifdef USE_XFORMS_IMAGE_LOADER
+#include "xformsImage.h"
+#else
+#include "graphics/GraphicsImageXPM.h"
+#endif
 
 #include "support/LAssert.h"
 #include "support/lstrings.h"
@@ -150,8 +156,14 @@ Painter & XPainter::arc(int x, int y,
  
 Painter & XPainter::image(int x, int y, 
        int w, int h,
-       grfx::GImage const & image)
+       grfx::Image const & i)
 {
+#ifdef USE_XFORMS_IMAGE_LOADER
+       grfx::xformsImage const & image = static_cast<grfx::xformsImage const &>(i);
+#else
+       grfx::ImageXPM const & image = static_cast<grfx::ImageXPM const &>(i);
+#endif
+       
        XGCValues val;
        val.function = GXcopy;
        GC gc = XCreateGC(fl_get_display(), owner_.getPixmap(),
@@ -198,7 +210,7 @@ Painter & XPainter::text(int x, int y,
                        xs[i].byte1 = c >> 8;
                        xs[i].byte2 = c & 0xff;
                }
-               text(x , y, xs.get(), ls, font);
+               text(x, y, xs.get(), ls, font);
                return *this;
        }