FLTK 1.3.2
Fl_Tiled_Image.H
00001 //
00002 // "$Id$"
00003 //
00004 // Tiled image header file for the Fast Light Tool Kit (FLTK).
00005 //
00006 // Copyright 1998-2010 by Bill Spitzak and others.
00007 //
00008 // This library is free software. Distribution and use rights are outlined in
00009 // the file "COPYING" which should have been included with this file.  If this
00010 // file is missing or damaged, see the license at:
00011 //
00012 //     http://www.fltk.org/COPYING.php
00013 //
00014 // Please report all bugs and problems on the following page:
00015 //
00016 //     http://www.fltk.org/str.php
00017 //
00018 
00019 /* \file
00020    Fl_Tiled_Image widget . */
00021 
00022 #ifndef Fl_Tiled_Image_H
00023 #  define Fl_Tiled_Image_H
00024 
00025 #  include "Fl_Image.H"
00026 
00027 
00036 class FL_EXPORT Fl_Tiled_Image : public Fl_Image {
00037   protected:
00038 
00039   Fl_Image      *image_;                // The image that is shared
00040   int           alloc_image_;           // Did we allocate this image?
00041 
00042   public:
00043 
00044   Fl_Tiled_Image(Fl_Image *i, int W = 0, int H = 0);
00045   virtual ~Fl_Tiled_Image();
00046 
00047   virtual Fl_Image *copy(int W, int H);
00048   Fl_Image *copy() { return copy(w(), h()); }
00049   virtual void color_average(Fl_Color c, float i);
00050   virtual void desaturate();
00051   virtual void draw(int X, int Y, int W, int H, int cx, int cy);
00052   void draw(int X, int Y) { draw(X, Y, w(), h(), 0, 0); }
00054   Fl_Image *image() { return image_; }
00055 };
00056 
00057 #endif // !Fl_Tiled_Image_H
00058 
00059 //
00060 // End of "$Id$"
00061 //