#include <Fl_Image.h>
Inheritance diagram for Fl_Image:
Public Methods | |
Fl_Image (const char *filename, int quality=FL_QUALITY_NORMAL) | |
Create image from compressed data. More... | |
Fl_Image (const uint8 *data, uint32 data_size, int quality=FL_QUALITY_NORMAL) | |
Create image from compressed data. More... | |
Fl_Image (const char *const *data, int quality=FL_QUALITY_NORMAL) | |
Create image from XPM data with given quality option. | |
Fl_Image (int W, int H, Fl_PixelFormat *fmt, uint8 *data, bool allow_free=false) | |
Create image from uncompressed data with given format. More... | |
Fl_Image (int W, int H, int bits_pp, uint8 *data=0, bool allow_free=false, uint32 Rmask=0, uint32 Gmask=0, uint32 Bmask=0, uint32 Amask=0) | |
Create image from uncompressed data with given bits per pixel 'bits_pp'. More... | |
Fl_Image (Fl_Image &i) | |
Create copy of image 'i'. | |
virtual | ~Fl_Image () |
Deletes all data, masks and offscreen pixmaps, if they were allocated by Fl_Image or permission to free given. More... | |
bool | read_image (const char *filename, const uint8 *data=0, uint32 data_size=0) |
bool | read_image (const char *filename, const char *const *data) |
bool | read_image (const char *filename, char **data) |
bool | write_image (const char *filename, const char *io_name) |
bool | write_image (const char *filename, Fl_Image_IO *io) |
bool | write_image (uint8 *&data, int &data_size, const char *io_name) |
bool | write_image (uint8 *&data, int &data_size, Fl_Image_IO *io) |
int | quality () const |
void | quality (int q) |
void | copy (Fl_Image &src, Fl_Image &dst) |
virtual void | measure (int &W, int &H) |
void | draw (int dx, int dy, int dw, int dh, int sx, int sy, int sw, int sh, Fl_Flags f) |
void | draw (int x, int y, int w=0, int h=0, Fl_Flags f=0) |
int | mask_type () const |
void | mask_type (int mask) |
void | set_mask (Pixmap m, bool allow_free=false) |
Pixmap | get_mask () const |
void | set_offscreen (Pixmap p, bool allow_free=false) |
Pixmap | get_offscreen () const |
Region | create_region_mask (check_mask_pixel *func=0) const |
Region | create_scaled_region_mask (int w, int h, check_mask_pixel *func=0) |
Pixmap | create_bitmap_mask (check_mask_pixel *func=0) const |
Pixmap | create_scaled_bitmap_mask (int w, int h, check_mask_pixel *func=0) |
Pixmap | create_mask (int w, int h) |
Fl_Image * | scale (int W, int H) |
Fl_Image * | grayscale () |
Fl_Image * | fore_blend (uint color) |
Fl_Image * | back_blend (uint color) |
Fl_Image * | blend (Fl_Image *back, int x, int y) |
void | clear () |
void | invalidate () |
void | system_convert () |
uint8 * | data () |
int | width () const |
int | height () const |
int | pitch () const |
int | bytespp () const |
int | bitspp () const |
int | state () const |
void | state (int s) |
uint32 | colorkey () const |
void | colorkey (uint32 c) |
uint8 | alpha () const |
void | alpha (uint8 a) |
uint8 | threshold () const |
void | threshold (uint8 t) |
Fl_Colormap * | colormap () const |
Fl_Colormap * | colormap (Fl_Colormap *new_map) |
Fl_PixelFormat * | format () const |
bool | check_map (Fl_PixelFormat *cur_fmt, Fl_PixelFormat *new_fmt) |
bool | check_map (Fl_PixelFormat *new_fmt) |
void | no_screen (bool v) |
bool | no_screen () const |
void | state_effect (bool value) |
bool | state_effect () const |
Static Public Methods | |
Fl_Image * | read (const char *filename, const uint8 *data=0, uint32 data_size=0) |
Fl_Image * | read_xpm (const char *filename, const char *const *data=0) |
bool | state_effect_all () |
void | state_effect_all (bool value) |
Protected Methods | |
Fl_Image () | |
Constructs empty image. | |
void | init (int W, int H, int bits_pp, uint8 *data, uint32 Rmask, uint32 Gmask, uint32 Bmask, uint32 Amask) |
virtual void | _draw (int dx, int dy, int dw, int dh, int sx, int sy, int sw, int sh, Fl_Flags f) |
void | to_screen (int X, int Y, int W, int H, int cx, int cy) |
void | to_screen_tiled (int X, int Y, int W, int H, int cx, int cy) |
Protected Attributes | |
int | m_width |
Width of image in pixels. | |
int | m_height |
Height of image in pixels. | |
int | m_pitch |
Pitch is word aligment bits per line value. | |
uint8 * | m_data |
Uncompressed data is stored to this. | |
bool | m_data_alloc |
True, if m_data is allocated by Fl_Image or free permission is granted. | |
bool | m_id_alloc |
True, 'id' offscreen pixmap is allocated by Fl_Image or permission to free granted. | |
bool | m_mask_alloc |
True, 'mask' offscreen bitmap is allocated by Fl_Image or permission to free granted. | |
void * | id |
offsreen id for drawing to screen. type of this is Pixmap. (under w32 HBITMAP). | |
void * | mask |
mask for offscreen id. type of this is Pixmap. (under w32 HBITMAP). | |
Friends | |
class | Fl_Image_Filter |
Definition at line 41 of file Fl_Image.h.
|
Create image from compressed data. Reads any supported image type from file 'filename', with given quality option. |
|
Create image from compressed data. Reads any supported image type from 'data', with given quality option. 'data_size' MUST be supplied also |
|
Create image from uncompressed data with given format. If data is NULL, data is allocated/freed by Fl_Image. if 'allow_free' flag is set, Fl_Image will de-allocate data on clear() (destructor) |
|
Create image from uncompressed data with given bits per pixel 'bits_pp'. If data is NULL, data is allocated/freed by Fl_Image. if 'allow_free' flag is set, Fl_Image will de-allocate data on clear() (destructor) You may also want to provide color masks, e.g. RGBA 32-bit image they are Rmask=0xFF000000, Gmask=0x00FF0000, Bmask=0x0000FF00, Amask=0x000000FF Otherwise default masks are calculated from bits per pixel. |
|
Deletes all data, masks and offscreen pixmaps, if they were allocated by Fl_Image or permission to free given.
|
|
Blends image to new image, using 'color' as backgroud. alpha() is used as opacity of image, if no alpha pixel in image. Format of this image is preserved to returned image |
|
Blends this to top of 'back'. New image is returned. Format of 'back' image is preserved to returned image |
|
Draws image to screen. Fl_Image override function. x, y, w, h are destination coordinates in widget to draw. Definition at line 143 of file Fl_Image.h. |
|
Draws image to screen.
dx, dy, dw, dh are destination coordinates in widget to draw. Definition at line 137 of file Fl_Image.h. |
|
Blends image to new image, using 'color' as foregroud (top of it) alpha() is used as opacity of 'color' Format of this image is preserved to returned image |
|
Converts image to grayscale. Format of image is pre-served |
|
Reimplemented in Fl_Multi_Image, and Fl_Pixmap. Definition at line 129 of file Fl_Image.h. |
|
Scales image, Returns new image. Format of image is pre-served |