4 * This file is part of LyX, the document processor.
5 * Licence details can be found in the file COPYING.
7 * \author Angus Leeming
10 * Full author contact details are available in file CREDITS.
16 #include "graphics/GraphicsImage.h"
23 class GuiImage : public Image
26 /// Access to this class is through this static method.
27 static Image * newImage();
29 /// Retrieve the buffered pixmap.
30 QPixmap const & pixmap() const
31 { return is_transformed_? transformed_ : original_; }
35 Image * clone() const;
36 /// Get the image width
37 unsigned int width() const;
38 /// Get the image height
39 unsigned int height() const;
40 // FIXME Is the image drawable ?
41 bool isDrawable() const { return true; }
43 * Load the image file into memory.
45 bool load(support::FileName const & filename);
47 * Finishes the process of modifying transformed_, using
48 * \c params to decide on color, grayscale etc.
49 * \returns true if successful.
51 bool setPixmap(Params const & params);
53 /// Clip the image using params.
54 bool clip(Params const & params);
55 /// Rotate the image using params.
56 bool rotate(Params const & params);
57 /// Scale the image using params.
58 bool scale(Params const & params);
60 /// Access to the class is through newImage() and clone.
63 GuiImage(GuiImage const &);
65 /// The original loaded image.
68 /// The transformed image for display.
70 /// Buffer the pixmap itself
74 } // namespace graphics