4 * This file is part of LyX, the document processor.
5 * Licence details can be found in the file COPYING.
7 * \author Angus Leeming
9 * Full author contact details are available in file CREDITS.
12 /* An instantiation of Image that makes use of the xforms lirary routines
13 * to load and store the image in memory.
19 #include "graphics/GraphicsImage.h"
24 typedef flimage_ FL_IMAGE;
29 class xformsImage : public Image
32 /// Access to this class is through this static method.
33 static ImagePtr newImage();
35 /// Return the list of loadable formats.
36 static FormatList loadableFormats();
41 Pixmap getPixmap() const;
43 /// Internal callbacks.
44 void statusCB(std::string const &);
45 void errorCB(std::string const &);
49 virtual Image * clone_impl() const;
50 /// Get the image width
51 virtual unsigned int getWidth_impl() const;
52 /// Get the image height
53 virtual unsigned int getHeight_impl() const;
54 /// Is the image drawable ?
55 virtual bool isDrawable_impl() const;
56 /** Load the image file into memory.
57 * The process is asynchronous, so this method starts the loading.
58 * When finished, the Image::finishedLoading signal is emitted.
60 virtual void load_impl(std::string const & filename);
61 /** Generate the pixmap, based on the current state of
62 * image_ (clipped, rotated, scaled etc).
63 * Uses the params to decide on color, grayscale etc.
64 * Returns true if the pixmap is created.
66 bool setPixmap_impl(Params const & params);
67 /// Clip the image using params.
68 virtual void clip_impl(Params const & params);
70 /// Rotate the image using params.
71 virtual void rotate_impl(Params const & params);
73 /// Scale the image using params.
74 virtual void scale_impl(Params const & params);
76 /// Access to the class is through newImage() and clone.
79 xformsImage(xformsImage const &);
81 /// The xforms container.
84 /// The pixmap itself.
87 /// Is the pixmap initialized?
97 PixmapStatus pixmap_status_;
100 } // namespace graphics
103 #endif // XFORMSIMAGE_H