Dillo
imgbuf.hh
Go to the documentation of this file.
1 #ifndef __DW_IMGBUF_HH__
2 #define __DW_IMGBUF_HH__
3 
4 #ifndef __INCLUDED_FROM_DW_CORE_HH__
5 # error Do not include this file directly, use "core.hh" instead.
6 #endif
7 
8 #include "../lout/debug.hh"
9 
10 namespace dw {
11 namespace core {
12 
162 {
163 public:
165 
166  inline Imgbuf () {
167  DBG_OBJ_CREATE ("dw::core::Imgbuf");
170  }
171 
172  inline ~Imgbuf () {
173  DBG_OBJ_DELETE ();
174  }
175 
176  /*
177  * Methods called from the image decoding
178  */
179 
180  virtual void setCMap (int *colors, int num_colors) = 0;
181  virtual void copyRow (int row, const byte *data) = 0;
182  virtual void newScan () = 0;
183 
184  /*
185  * Methods called from dw::Image
186  */
187 
188  virtual Imgbuf* getScaledBuf (int width, int height) = 0;
189  virtual void getRowArea (int row, dw::core::Rectangle *area) = 0;
190  virtual int getRootWidth () = 0;
191  virtual int getRootHeight () = 0;
192 
193 
198  virtual Imgbuf *createSimilarBuf (int width, int height) = 0;
199 
203  virtual void copyTo (Imgbuf *dest, int xDestRoot, int yDestRoot,
204  int xSrc, int ySrc, int widthSrc, int heightSrc) = 0;
205 
206  /*
207  * Reference counting.
208  */
209 
210  virtual void ref () = 0;
211  virtual void unref () = 0;
212 
216  virtual bool lastReference () = 0;
217 
218 
222  virtual void setDeleteOnUnref (bool deleteOnUnref) = 0;
223 
227  virtual bool isReferred () = 0;
228 };
229 
230 } // namespace core
231 } // namespace dw
232 
233 #endif // __DW_IMGBUF_HH__
Definition: imgbuf.hh:164
virtual int getRootHeight()=0
#define DBG_OBJ_BASECLASS(klass)
Definition: debug_rtfl.hh:416
dw::core::Shape implemtation for simple rectangles.
Definition: types.hh:69
This is the base class for many other classes, which defines very common virtual methods.
Definition: object.hh:24
virtual void copyTo(Imgbuf *dest, int xDestRoot, int yDestRoot, int xSrc, int ySrc, int widthSrc, int heightSrc)=0
virtual void copyRow(int row, const byte *data)=0
virtual Imgbuf * createSimilarBuf(int width, int height)=0
virtual bool lastReference()=0
Type
Definition: imgbuf.hh:164
virtual void setDeleteOnUnref(bool deleteOnUnref)=0
unsigned char byte
Definition: core.hh:25
virtual int getRootWidth()=0
Definition: imgbuf.hh:164
#define DBG_OBJ_CREATE(klass)
Definition: debug_rtfl.hh:412
An observed object has a signal emitter, which tells the receivers, when the object is deleted...
Definition: signal.hh:274
virtual void getRowArea(int row, dw::core::Rectangle *area)=0
Imgbuf()
Definition: imgbuf.hh:166
#define DBG_OBJ_DELETE()
Definition: debug_rtfl.hh:414
The platform independent interface for image buffers.
Definition: imgbuf.hh:161
virtual Imgbuf * getScaledBuf(int width, int height)=0
Dw is in this namespace, or sub namespaces of this one.
Definition: alignedtablecell.cc:28
Definition: imgbuf.hh:164
Definition: imgbuf.hh:164
virtual void newScan()=0
~Imgbuf()
Definition: imgbuf.hh:172
virtual void ref()=0
virtual bool isReferred()=0
virtual void unref()=0
Definition: imgbuf.hh:164
virtual void setCMap(int *colors, int num_colors)=0