4 * Copyright 2002 the LyX Team
5 * Read the file COPYING
7 * \author Angus Leeming, a.leeming@ic.ac.uk
10 /* An instantiation of Image that makes use of the xforms lirary routines
11 * to load and store the image in memory.
21 #include "graphics/GraphicsImage.h"
24 typedef flimage_ FL_IMAGE;
28 class xformsImage : public Image
31 /// Access to this class is through this static method.
32 static ImagePtr newImage();
34 /// Return the list of loadable formats.
35 static FormatList loadableFormats();
41 Image * clone() const;
44 Pixmap getPixmap() const;
46 /// Get the image width
47 unsigned int getWidth() const;
49 /// Get the image height
50 unsigned int getHeight() const;
52 /** Load the image file into memory.
53 * The process is asynchronous, so this method starts the loading.
54 * When finished, the Image::finishedLoading signal is emitted.
56 void load(string const & filename);
58 /** Generate the pixmap, based on the current state of
59 * image_ (clipped, rotated, scaled etc).
60 * Uses the params to decide on color, grayscale etc.
61 * Returns true if the pixmap is created.
63 bool setPixmap(Params const & params);
65 /// Clip the image using params.
66 void clip(Params const & params);
68 /// Rotate the image using params.
69 void rotate(Params const & params);
71 /// Scale the image using params.
72 void scale(Params const & params);
74 /// Internal callbacks.
75 void statusCB(string const &);
77 void errorCB(string const &);
80 /// Access to the class is through newImage() and clone.
83 xformsImage(xformsImage const &);
85 /// The xforms container.
88 /// The pixmap itself.
91 /// Is the pixmap initialized?
101 PixmapStatus pixmap_status_;
106 #endif // XFORMSIMAGE_H