4 * Read the file COPYING
6 * \author Angus Leeming
8 * Full author contact details are available in file CREDITS
11 /* An instantiation of Image that makes use of the xforms lirary routines
12 * to load and store the image in memory.
22 #include "graphics/GraphicsImage.h"
27 typedef flimage_ FL_IMAGE;
31 class xformsImage : public Image
34 /// Access to this class is through this static method.
35 static ImagePtr newImage();
37 /// Return the list of loadable formats.
38 static FormatList loadableFormats();
44 Image * clone() const;
47 Pixmap getPixmap() const;
49 /// Get the image width
50 unsigned int getWidth() const;
52 /// Get the image height
53 unsigned int getHeight() const;
55 virtual bool isDrawable() const;
57 /** Load the image file into memory.
58 * The process is asynchronous, so this method starts the loading.
59 * When finished, the Image::finishedLoading signal is emitted.
61 void load(string const & filename);
63 /** Generate the pixmap, based on the current state of
64 * image_ (clipped, rotated, scaled etc).
65 * Uses the params to decide on color, grayscale etc.
66 * Returns true if the pixmap is created.
68 bool setPixmap(Params const & params);
70 /// Clip the image using params.
71 void clip(Params const & params);
73 /// Rotate the image using params.
74 void rotate(Params const & params);
76 /// Scale the image using params.
77 void scale(Params const & params);
79 /// Internal callbacks.
80 void statusCB(string const &);
82 void errorCB(string const &);
85 /// Access to the class is through newImage() and clone.
88 xformsImage(xformsImage const &);
90 /// The xforms container.
93 /// The pixmap itself.
96 /// Is the pixmap initialized?
106 PixmapStatus pixmap_status_;
111 #endif // XFORMSIMAGE_H