Dillo v3.1.1-98-g318d1f14
Loading...
Searching...
No Matches
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
10namespace dw {
11namespace core {
12
162{
163public:
165
171
172 inline ~Imgbuf () {
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__
The platform independent interface for image buffers.
Definition imgbuf.hh:162
virtual void copyRow(int row, const byte *data)=0
virtual int getRootWidth()=0
virtual void ref()=0
virtual void newScan()=0
virtual Imgbuf * getScaledBuf(int width, int height)=0
virtual void setCMap(int *colors, int num_colors)=0
virtual void setDeleteOnUnref(bool deleteOnUnref)=0
virtual void getRowArea(int row, dw::core::Rectangle *area)=0
virtual void unref()=0
virtual bool isReferred()=0
virtual int getRootHeight()=0
virtual bool lastReference()=0
virtual void copyTo(Imgbuf *dest, int xDestRoot, int yDestRoot, int xSrc, int ySrc, int widthSrc, int heightSrc)=0
Copies another image buffer into this image buffer.
virtual Imgbuf * createSimilarBuf(int width, int height)=0
Creates an image buffer with same parameters (type, gamma etc.) except size.
dw::core::Shape implemtation for simple rectangles.
Definition types.hh:70
This is the base class for many other classes, which defines very common virtual methods.
Definition object.hh:25
An observed object has a signal emitter, which tells the receivers, when the object is deleted.
Definition signal.hh:275
#define DBG_OBJ_DELETE()
#define DBG_OBJ_CREATE(klass)
#define DBG_OBJ_BASECLASS(klass)
Dw is in this namespace, or sub namespaces of this one.