summaryrefslogtreecommitdiff
path: root/FL
diff options
context:
space:
mode:
authorAlbrecht Schlosser <albrechts.fltk@online.de>2015-03-01 20:16:56 +0000
committerAlbrecht Schlosser <albrechts.fltk@online.de>2015-03-01 20:16:56 +0000
commit4d1e372e09c850bddbb5e7e05d7ed21e7de7de3d (patch)
treea851887522f90940900f1a6edcabb93b652a689f /FL
parent966ca9faa3ea0ae97a081e933852cb6839bfd38c (diff)
Improve Fl_Tiled_Image drawing, scheme background setup, and documentation.
Fl::scheme("plastic") now correctly sets the background image width and height to 0, which causes the background image to fill the whole window. Fl_Tiled_Image drawing was partly broken. Offsets (cx, cy) were not used correctly, and some other inconsistencies with arguments were possible. Drawing has been optimized to draw only those tiles that are not clipped. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10598 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'FL')
-rw-r--r--FL/Fl_Tiled_Image.H16
1 files changed, 7 insertions, 9 deletions
diff --git a/FL/Fl_Tiled_Image.H b/FL/Fl_Tiled_Image.H
index fd640601d..a2718a7ba 100644
--- a/FL/Fl_Tiled_Image.H
+++ b/FL/Fl_Tiled_Image.H
@@ -3,7 +3,7 @@
//
// Tiled image header file for the Fast Light Tool Kit (FLTK).
//
-// Copyright 1998-2010 by Bill Spitzak and others.
+// Copyright 1998-2015 by Bill Spitzak and others.
//
// This library is free software. Distribution and use rights are outlined in
// the file "COPYING" which should have been included with this file. If this
@@ -26,17 +26,15 @@
/**
- This class supports tiling of images
- over a specified area. The source (tile) image is <B>not</B>
- copied unless you call the color_average(),
- desaturate(),
- or inactive()
- methods.
+ This class supports tiling of images over a specified area.
+
+ The source (tile) image is \b not copied unless you call the
+ color_average(), desaturate(), or inactive() methods.
*/
class FL_EXPORT Fl_Tiled_Image : public Fl_Image {
protected:
- Fl_Image *image_; // The image that is shared
+ Fl_Image *image_; // The image that is tiled
int alloc_image_; // Did we allocate this image?
public:
@@ -50,7 +48,7 @@ class FL_EXPORT Fl_Tiled_Image : public Fl_Image {
virtual void desaturate();
virtual void draw(int X, int Y, int W, int H, int cx, int cy);
void draw(int X, int Y) { draw(X, Y, w(), h(), 0, 0); }
- /** Gets The image that is shared */
+ /** Gets The image that is tiled */
Fl_Image *image() { return image_; }
};