20 #ifndef Fl_Shared_Image_H 21 # define Fl_Shared_Image_H 27 typedef Fl_Image *(*Fl_Shared_Handler)(
const char *name,
uchar *header,
53 friend class Fl_Graphics_Driver;
58 static int num_images_;
59 static int alloc_images_;
60 static Fl_Shared_Handler *handlers_;
61 static int num_handlers_;
62 static int alloc_handlers_;
81 const char *
name() {
return name_; }
108 virtual void draw(
int X,
int Y,
int W,
int H,
int cx = 0,
int cy = 0);
109 void draw(
int X,
int Y) {
draw(X, Y,
w(),
h(), 0, 0); }
116 static int num_images();
117 static void add_handler(Fl_Shared_Handler f);
118 static void remove_handler(Fl_Shared_Handler f);
129 #endif // !Fl_Shared_Image_H virtual void desaturate()
The desaturate() method converts an image to grayscale.
Definition: Fl_Image.cxx:110
int h() const
Returns the current image drawing height in FLTK units.
Definition: Fl_Image.H:132
The Fl_PNG_Image class supports loading, caching, and drawing of Portable Network Graphics (PNG) imag...
Definition: Fl_PNG_Image.H:30
virtual Fl_Shared_Image * as_shared_image()
Returns whether an image is an Fl_Shared_Image or not.
Definition: Fl_Shared_Image.H:100
Base class for image caching, scaling and drawing.
Definition: Fl_Image.H:62
Fl_Image, Fl_RGB_Image classes.
int w() const
Returns the current image drawing width in FLTK units.
Definition: Fl_Image.H:126
The Fl_RGB_Image class supports caching and drawing of full-color images with 1 to 4 channels of colo...
Definition: Fl_Image.H:287
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:60
const char * name()
Returns the filename of the shared image.
Definition: Fl_Shared_Image.H:81
The Fl_JPEG_Image class supports loading, caching, and drawing of Joint Photographic Experts Group (J...
Definition: Fl_JPEG_Image.H:30
Fl_Image * copy()
Creates a copy of the specified image.
Definition: Fl_Image.H:217
int original()
Returns whether this is an original image.
Definition: Fl_Shared_Image.H:95
int refcount()
Returns the number of references of this shared image.
Definition: Fl_Shared_Image.H:86
virtual void release()
Releases an Fl_Image - the same as 'delete this'.
Definition: Fl_Image.H:192
virtual void color_average(Fl_Color c, float i)
The color_average() method averages the colors in the image with the FLTK color value c...
Definition: Fl_Image.cxx:99
unsigned int Fl_Color
An FLTK color value; see also Colors.
Definition: Enumerations.H:1042
FL_EXPORT void fl_register_images()
Register the image formats.
Definition: fl_images_core.cxx:56
This class supports caching, loading, and drawing of image files.
Definition: Fl_Shared_Image.H:49
virtual void uncache()
If the image has been cached for display, delete the cache data.
Definition: Fl_Image.cxx:57
unsigned char uchar
unsigned char
Definition: fl_types.h:28