|
Dillo v3.2.0-93-g6a586845
|
The DilloImage data-structure and methods. More...


Go to the source code of this file.
Classes | |
| struct | _DilloImage |
Macros | |
| #define | IMAGE_MAX_AREA (6000 * 6000) |
| Arbitrary maximum for image size. | |
Typedefs | |
| typedef struct _DilloImage | DilloImage |
Enumerations | |
| enum | DilloImgType { DILLO_IMG_TYPE_INDEXED , DILLO_IMG_TYPE_RGB , DILLO_IMG_TYPE_GRAY , DILLO_IMG_TYPE_CMYK_INV , DILLO_IMG_TYPE_NOTSET } |
| enum | ImageState { IMG_Empty , IMG_SetParms , IMG_SetCmap , IMG_Write , IMG_Close , IMG_Abort } |
Functions | |
| DilloImage * | a_Image_new (void *layout, void *img_rndr, int32_t bg_color, int32_t fg_color) |
| Create and initialize a new image structure. | |
| DilloImage * | a_Image_new_with_dw (void *layout, const char *alt_text, int32_t bg_color, int32_t fg_color) |
| Create and initialize a new image structure with an image widget. | |
| void * | a_Image_get_dw (DilloImage *Image) |
| Return the image renderer as a widget. | |
| void | a_Image_ref (DilloImage *Image) |
| Add a reference to an Image struct Do nothing if the argument is NULL. | |
| void | a_Image_unref (DilloImage *Image) |
| Unref and free if necessary Do nothing if the argument is NULL. | |
| void | a_Image_set_parms (DilloImage *Image, void *v_imgbuf, DilloUrl *url, int version, uint_t width, uint_t height, DilloImgType type) |
| Set initial parameters of the image. | |
| void | a_Image_write (DilloImage *Image, uint_t y) |
| Implement the write method. | |
| void | a_Image_close (DilloImage *Image) |
| Implement the close method. | |
| void | a_Image_abort (DilloImage *Image) |
| Implement the abort method. | |
The DilloImage data-structure and methods.
Definition in file image.hh.
| #define IMAGE_MAX_AREA (6000 * 6000) |
| typedef struct _DilloImage DilloImage |
| enum DilloImgType |
| enum ImageState |
| void a_Image_abort | ( | DilloImage * | Image | ) |
Implement the abort method.
Definition at line 153 of file image.cc.
Referenced by a_Dicache_callback().
| void a_Image_close | ( | DilloImage * | Image | ) |
Implement the close method.
Definition at line 144 of file image.cc.
Referenced by a_Dicache_callback().
| void * a_Image_get_dw | ( | DilloImage * | Image | ) |
Return the image renderer as a widget.
This is somewhat tricky, since simple casting leads to wrong (and hard to debug) results, because of multiple inheritance. This function can be used from C code, where only access to void* is possible.
Definition at line 72 of file image.cc.
Referenced by Dicache_image().
| DilloImage * a_Image_new | ( | void * | layout, |
| void * | img_rndr, | ||
| int32_t | bg_color, | ||
| int32_t | fg_color | ||
| ) |
Create and initialize a new image structure.
Definition at line 34 of file image.cc.
References dNew, IMG_Empty, dw::core::Widget::layout, and layout.
Referenced by a_Html_image_new(), a_Image_new_with_dw(), and StyleEngine::apply().
| DilloImage * a_Image_new_with_dw | ( | void * | layout, |
| const char * | alt_text, | ||
| int32_t | bg_color, | ||
| int32_t | fg_color | ||
| ) |
Create and initialize a new image structure with an image widget.
Definition at line 59 of file image.cc.
References a_Image_new(), and layout.
Referenced by Dicache_image().
| void a_Image_ref | ( | DilloImage * | Image | ) |
Add a reference to an Image struct Do nothing if the argument is NULL.
Definition at line 100 of file image.cc.
Referenced by a_Html_image_new(), StyleEngine::apply(), Dicache_image(), and Html_load_image().
| void a_Image_set_parms | ( | DilloImage * | Image, |
| void * | v_imgbuf, | ||
| DilloUrl * | url, | ||
| int | version, | ||
| uint_t | width, | ||
| uint_t | height, | ||
| DilloImgType | type | ||
| ) |
Set initial parameters of the image.
Definition at line 109 of file image.cc.
References _MSG, a_Bitvec_new(), I2IR, and IMG_SetParms.
Referenced by a_Dicache_callback().
| void a_Image_unref | ( | DilloImage * | Image | ) |
Unref and free if necessary Do nothing if the argument is NULL.
Definition at line 89 of file image.cc.
References _MSG, and Image_free().
Referenced by a_Html_image_new(), a_Web_free(), DilloHtml::loadImages(), and DilloHtml::~DilloHtml().
| void a_Image_write | ( | DilloImage * | Image, |
| uint_t | y | ||
| ) |
Implement the write method.
Definition at line 130 of file image.cc.
References _MSG, a_Bitvec_set_bit(), dReturn_if_fail, I2IR, and IMG_Write.
Referenced by a_Dicache_callback().