X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Fgraphics%2FGraphicsImageXPM.h;h=01b720d40b36cab4cfd1e97967b5857c39d68102;hb=f643df79a890ec4bc2eb05a3fd3d349ba3994f96;hp=a2cc32c80663c26af0cad754228bf59bf179d7ac;hpb=fcc752984319a42f843d6b4a044ceb956eed868a;p=lyx.git diff --git a/src/graphics/GraphicsImageXPM.h b/src/graphics/GraphicsImageXPM.h index a2cc32c806..01b720d40b 100644 --- a/src/graphics/GraphicsImageXPM.h +++ b/src/graphics/GraphicsImageXPM.h @@ -5,9 +5,9 @@ * Read the file COPYING * * \author Baruch Even - * \author Angus Leeming + * \author Angus Leeming * - * An instantiation of GImage that makes use of libXPM to load and store + * An instantiation of Image that makes use of libXPM to load and store * the image in memory. */ @@ -24,7 +24,7 @@ namespace grfx { -class GImageXPM : public GImage +class ImageXPM : public Image { public: /// Access to this class is through this static method. @@ -34,46 +34,48 @@ public: static FormatList loadableFormats(); /// - ~GImageXPM(); + ~ImageXPM(); /// Create a copy - GImage * clone() const; + Image * clone() const; /// Pixmap getPixmap() const; /// Get the image width unsigned int getWidth() const; - + /// Get the image height unsigned int getHeight() const; + bool isDrawable() const; + /** Load the image file into memory. - * In this case (GImageXPM), the process is blocking. + * In this case (ImageXPM), the process is blocking. */ - void load(string const & filename, SignalTypePtr); + void load(string const & filename); /** Generate the pixmap, based on the current state of the * xpm_image_ (clipped, rotated, scaled etc). * Uses the params to decide on color, grayscale etc. * Returns true if the pixmap is created. */ - bool setPixmap(GParams const & params); + bool setPixmap(Params const & params); /// Clip the image using params. - void clip(GParams const & params); - + void clip(Params const & params); + /// Rotate the image using params. - void rotate(GParams const & params); - + void rotate(Params const & params); + /// Scale the image using params. - void scale(GParams const & params); + void scale(Params const & params); private: /// Access to the class is through newImage() and clone. - GImageXPM(); + ImageXPM(); /// - GImageXPM(GImageXPM const &); + ImageXPM(ImageXPM const &); /** Contains the data read from file. * This class is a wrapper for a XpmImage struct, but all views @@ -82,7 +84,7 @@ private: * c_color together with g_color and m_color entries for each c_color * entry when it is first stored. */ - class Data + class Data { public: /// Default c-tor. Initialise everything to zero. @@ -132,7 +134,7 @@ private: unsigned int color_none_id() const; }; - + Data image_; /// The pixmap itself. @@ -147,7 +149,7 @@ private: /// PIXMAP_SUCCESS }; - + PixmapStatus pixmap_status_; };