20#ifndef Fl_Shared_Image_H
21# define Fl_Shared_Image_H
71typedef Fl_Image *(*Fl_Shared_Handler)(
const char *name,
99 friend class Fl_Graphics_Driver;
104 static int num_images_;
105 static int alloc_images_;
107 static int num_handlers_;
108 static int alloc_handlers_;
128 static void print_pool();
132 const char *
name() {
return name_; }
149 virtual
void reload();
161 void draw(
int X,
int Y,
int W,
int H,
int cx = 0,
int cy = 0)
FL_OVERRIDE;
162 void draw(
int X,
int Y) {
draw(X, Y,
w(),
h(), 0, 0); }
169 static
int num_images();
unsigned int Fl_Color
An FLTK color value; see also Colors
Definition Enumerations.H:1101
Fl_Image, Fl_RGB_Image classes.
void fl_register_images()
Register the known image formats.
Definition fl_images_core.cxx:61
Fl_Image *(* Fl_Shared_Handler)(const char *name, uchar *header, int headerlen)
Test function (typedef) for adding new shared image formats.
Definition Fl_Shared_Image.H:71
Base class for image caching, scaling and drawing.
Definition Fl_Image.H:60
virtual void draw(int X, int Y, int W, int H, int cx=0, int cy=0)
Draws the image to the current drawing surface with a bounding box.
Definition Fl_Image.cxx:62
virtual void desaturate()
The desaturate() method converts an image to grayscale.
Definition Fl_Image.cxx:140
virtual void color_average(Fl_Color c, float i)
The color_average() method averages the colors in the image with the provided FLTK color value.
Definition Fl_Image.cxx:128
int w() const
Returns the current image drawing width in FLTK units.
Definition Fl_Image.H:131
Fl_Image * copy() const
Creates a copy of the image in the same size.
Definition Fl_Image.H:266
virtual void release()
Releases an Fl_Image - the same as 'delete this'.
Definition Fl_Image.H:220
int h() const
Returns the current image drawing height in FLTK units.
Definition Fl_Image.H:137
virtual void uncache()
If the image has been cached for display, delete the cache data.
Definition Fl_Image.cxx:59
The Fl_JPEG_Image class supports loading, caching, and drawing of Joint Photographic Experts Group (J...
Definition Fl_JPEG_Image.H:30
The Fl_PNG_Image class supports loading, caching, and drawing of Portable Network Graphics (PNG) imag...
Definition Fl_PNG_Image.H:30
The Fl_RGB_Image class supports caching and drawing of full-color images with 1 to 4 channels of colo...
Definition Fl_Image.H:339
The Fl_SVG_Image class supports loading, caching and drawing of scalable vector graphics (SVG) images...
Definition Fl_SVG_Image.H:135
This class supports caching, loading, and drawing of image files.
Definition Fl_Shared_Image.H:94
const char * name()
Returns the filename of the shared image.
Definition Fl_Shared_Image.H:132
int original()
Returns whether this is an original image.
Definition Fl_Shared_Image.H:146
int refcount()
Returns the number of references of this shared image.
Definition Fl_Shared_Image.H:137
#define FL_OVERRIDE
This macro makes it safe to use the C++11 keyword override with older compilers.
Definition fl_attr.h:46
unsigned char uchar
unsigned char
Definition fl_types.h:30