FLTK 1.3.2
Fl_Tiled_Image.H
1 //
2 // "$Id: Fl_Tiled_Image.H 8864 2011-07-19 04:49:30Z greg.ercolano $"
3 //
4 // Tiled image header file for the Fast Light Tool Kit (FLTK).
5 //
6 // Copyright 1998-2010 by Bill Spitzak and others.
7 //
8 // This library is free software. Distribution and use rights are outlined in
9 // the file "COPYING" which should have been included with this file. If this
10 // file is missing or damaged, see the license at:
11 //
12 // http://www.fltk.org/COPYING.php
13 //
14 // Please report all bugs and problems on the following page:
15 //
16 // http://www.fltk.org/str.php
17 //
18 
19 /* \file
20  Fl_Tiled_Image widget . */
21 
22 #ifndef Fl_Tiled_Image_H
23 # define Fl_Tiled_Image_H
24 
25 # include "Fl_Image.H"
26 
27 
36 class FL_EXPORT Fl_Tiled_Image : public Fl_Image {
37  protected:
38 
39  Fl_Image *image_; // The image that is shared
40  int alloc_image_; // Did we allocate this image?
41 
42  public:
43 
44  Fl_Tiled_Image(Fl_Image *i, int W = 0, int H = 0);
45  virtual ~Fl_Tiled_Image();
46 
47  virtual Fl_Image *copy(int W, int H);
48  Fl_Image *copy() { return copy(w(), h()); }
49  virtual void color_average(Fl_Color c, float i);
50  virtual void desaturate();
51  virtual void draw(int X, int Y, int W, int H, int cx, int cy);
52  void draw(int X, int Y) { draw(X, Y, w(), h(), 0, 0); }
54  Fl_Image *image() { return image_; }
55 };
56 
57 #endif // !Fl_Tiled_Image_H
58 
59 //
60 // End of "$Id: Fl_Tiled_Image.H 8864 2011-07-19 04:49:30Z greg.ercolano $"
61 //
virtual void desaturate()
The desaturate() method converts an image to grayscale.
Definition: Fl_Image.cxx:99
Fl_Image is the base class used for caching and drawing all kinds of images in FLTK.
Definition: Fl_Image.H:44
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:52
Fl_Image * image()
Gets The image that is shared.
Definition: Fl_Tiled_Image.H:54
Fl_Image * copy()
The copy() method creates a copy of the specified image.
Definition: Fl_Image.H:129
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:90
unsigned int Fl_Color
an FLTK color value
Definition: Enumerations.H:774
int w() const
Returns the current image width in pixels.
Definition: Fl_Image.H:84
This class supports tiling of images over a specified area.
Definition: Fl_Tiled_Image.H:36
int h() const
Returns the current image height in pixels.
Definition: Fl_Image.H:87