22#ifndef Fl_Shared_Image_H 
   23#  define Fl_Shared_Image_H 
   30typedef Fl_Image *(*Fl_Shared_Handler)(
const char *name, 
uchar *header,
 
   53  friend class Fl_JPEG_Image;
 
   54  friend class Fl_PNG_Image;
 
   58#if FLTK_ABI_VERSION >= 10304 
   59  Fl_Image *scaled_image_;
 
   64  static int    num_images_;            
 
   65  static int    alloc_images_;          
 
   66  static Fl_Shared_Handler *handlers_;  
 
   67  static int    num_handlers_;          
 
   68  static int    alloc_handlers_;        
 
   87  static void print_pool();
 
   91  const char    *
name() { 
return name_; }
 
  114  virtual void draw(
int X, 
int Y, 
int W, 
int H, 
int cx, 
int cy);
 
  115  void draw(
int X, 
int Y) { 
draw(X, Y, 
w(), 
h(), 0, 0); }
 
  116  void scale(
int width, 
int height, 
int proportional = 1, 
int can_expand = 0);
 
  119  static Fl_Shared_Image *find(
const char *name, 
int W = 0, 
int H = 0);
 
  120  static Fl_Shared_Image *get(
const char *name, 
int W = 0, 
int H = 0);
 
  121  static Fl_Shared_Image *get(Fl_RGB_Image *rgb, 
int own_it = 1);
 
  122  static Fl_Shared_Image **images();
 
  123  static int            num_images();
 
  124  static void           add_handler(Fl_Shared_Handler f);
 
  125  static void           remove_handler(Fl_Shared_Handler f);
 
 
unsigned int Fl_Color
An FLTK color value; see also Colors.
Definition Enumerations.H:941
Fl_Image, Fl_RGB_Image classes.
Fl_RGB_Scaling
The scaling algorithm to use for RGB images.
Definition Fl_Image.H:37
FL_EXPORT void fl_register_images()
Register the image formats.
Definition fl_images_core.cxx:54
Base class for image caching and drawing.
Definition Fl_Image.H:55
virtual void draw(int X, int Y, int W, int H, int cx=0, int cy=0)
Draws the image with a bounding box.
Definition Fl_Image.cxx:66
virtual void desaturate()
The desaturate() method converts an image to grayscale.
Definition Fl_Image.cxx:117
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:106
int w() const
Returns the current image width in pixels.
Definition Fl_Image.H:111
Fl_Image * copy()
The copy() method creates a copy of the specified image.
Definition Fl_Image.H:150
int h() const
Returns the current image height in pixels.
Definition Fl_Image.H:115
virtual void uncache()
If the image has been cached for display, delete the cache data.
Definition Fl_Image.cxx:63
void add()
Adds a shared image to the image cache.
Definition Fl_Shared_Image.cxx:155
static int compare(Fl_Shared_Image **i0, Fl_Shared_Image **i1)
Compares two shared images.
Definition Fl_Shared_Image.cxx:88
const char * name()
Returns the filename of the shared image.
Definition Fl_Shared_Image.H:91
static void scaling_algorithm(Fl_RGB_Scaling algorithm)
Sets what algorithm is used when resizing a source image.
Definition Fl_Shared_Image.H:134
Fl_Shared_Image()
Creates an empty shared image.
Definition Fl_Shared_Image.cxx:108
int original()
Returns whether this is an original image.
Definition Fl_Shared_Image.H:105
int refcount()
Returns the number of references of this shared image.
Definition Fl_Shared_Image.H:96
unsigned char uchar
unsigned char
Definition fl_types.h:30