FLTK 1.4.4

Loading...
Searching...
No Matches
Fl_Tiled_Image.H
1//
2// Tiled image header file for the Fast Light Tool Kit (FLTK).
3//
4// Copyright 1998-2015 by Bill Spitzak and others.
5//
6// This library is free software. Distribution and use rights are outlined in
7// the file "COPYING" which should have been included with this file. If this
8// file is missing or damaged, see the license at:
9//
10// https://www.fltk.org/COPYING.php
11//
12// Please see the following page on how to report bugs and issues:
13//
14// https://www.fltk.org/bugs.php
15//
16
17/* \file
18 Fl_Tiled_Image widget . */
19
20#ifndef Fl_Tiled_Image_H
21# define Fl_Tiled_Image_H
22
23# include "Fl_Image.H"
24
25
32 class FL_EXPORT Fl_Tiled_Image : public Fl_Image {
33 protected:
34
35 Fl_Image *image_; // The image that is tiled
36 int alloc_image_; // Did we allocate this image?
37
38 public:
39 Fl_Tiled_Image(Fl_Image *i, int W = 0, int H = 0);
40 virtual ~Fl_Tiled_Image();
41
42 Fl_Image *copy(int W, int H) const FL_OVERRIDE;
43 Fl_Image *copy() const {
44 return Fl_Image::copy();
45 }
46 void color_average(Fl_Color c, float i) FL_OVERRIDE;
47 void desaturate() FL_OVERRIDE;
48 void draw(int X, int Y, int W, int H, int cx = 0, int cy = 0) FL_OVERRIDE;
49 void draw(int X, int Y) { draw(X, Y, w(), h(), 0, 0); }
51 Fl_Image *image() { return image_; }
52};
53
54#endif // !Fl_Tiled_Image_H
Fl_Color
unsigned int Fl_Color
An FLTK color value; see also Colors.
Definition Enumerations.H:1120
Fl_Image.H
Fl_Image, Fl_RGB_Image classes.
Fl_Image::draw
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
Fl_Image::desaturate
virtual void desaturate()
The desaturate() method converts an image to grayscale.
Definition Fl_Image.cxx:144
Fl_Image::color_average
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:132
Fl_Image::w
int w() const
Returns the current image drawing width in FLTK units.
Definition Fl_Image.H:131
Fl_Image::copy
Fl_Image * copy() const
Creates a copy of the image in the same size.
Definition Fl_Image.H:266
Fl_Image::h
int h() const
Returns the current image drawing height in FLTK units.
Definition Fl_Image.H:137
Fl_Tiled_Image::Fl_Tiled_Image
Fl_Tiled_Image(Fl_Image *i, int W=0, int H=0)
The constructors create a new tiled image containing the specified image.
Definition Fl_Tiled_Image.cxx:55
Fl_Tiled_Image::image
Fl_Image * image()
Gets The image that is tiled.
Definition Fl_Tiled_Image.H:51
FL_OVERRIDE
#define FL_OVERRIDE
This macro makes it safe to use the C++11 keyword override with older compilers.
Definition fl_attr.h:46