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.
20 #include "graphics/GraphicsImage.h"
25 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();
42 Image * clone() const;
45 Pixmap getPixmap() const;
47 /// Get the image width
48 unsigned int getWidth() const;
50 /// Get the image height
51 unsigned int getHeight() const;
53 virtual bool isDrawable() const;
55 /** Load the image file into memory.
56 * The process is asynchronous, so this method starts the loading.
57 * When finished, the Image::finishedLoading signal is emitted.
59 void load(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(Params const & params);
68 /// Clip the image using params.
69 void clip(Params const & params);
71 /// Rotate the image using params.
72 void rotate(Params const & params);
74 /// Scale the image using params.
75 void scale(Params const & params);
77 /// Internal callbacks.
78 void statusCB(string const &);
80 void errorCB(string const &);
83 /// Access to the class is through newImage() and clone.
86 xformsImage(xformsImage const &);
88 /// The xforms container.
91 /// The pixmap itself.
94 /// Is the pixmap initialized?
104 PixmapStatus pixmap_status_;
109 #endif // XFORMSIMAGE_H