3 * \file GraphicsImage.h
4 * This file is part of LyX, the document processor.
5 * Licence details can be found in the file COPYING.
8 * \author Angus Leeming
10 * Full author contact details are available in file CREDITS.
12 * An abstract base class for the images themselves.
13 * Allows the user to retrieve the pixmap, once loaded and to issue commands
16 * The loading process can be asynchronous, but cropping, rotating and
17 * scaling block execution.
20 #ifndef GRAPHICSIMAGE_H
21 #define GRAPHICSIMAGE_H
25 namespace support { class FileName; }
37 virtual Image * clone() const = 0;
39 /// Get the image width
40 virtual unsigned int width() const = 0;
42 /// Get the image height
43 virtual unsigned int height() const = 0;
45 /// Is the image drawable ?
46 virtual bool isDrawable() const = 0;
48 /** Start loading the image file.
49 * The caller should expect this process to be asynchronous and
50 * so should connect to the "finished" signal above.
52 virtual bool load(support::FileName const & filename) = 0;
54 /** Generate the pixmap.
55 * Uses the params to decide on color, grayscale etc.
56 * Returns true if the pixmap is created.
58 virtual bool setPixmap(Params const & params) = 0;
61 /// Only way to create a new Image.
62 /// Implemented in the frontend.
65 } // namespace graphics
68 #endif // GRAPHICSIMAGE_H