summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorfire-eggs <lifeattickville@gmail.com>2020-07-20 15:22:00 -0400
committerAlbrecht Schlosser <albrechts.fltk@online.de>2020-09-01 13:15:51 +0200
commitcdda89455c6767b5f43628b1c9e45b2dc8f0d971 (patch)
treeaf0873c1f46842ef4bcad85f6e267dc2e883fed4 /src
parentb65d3a249d4db1ada6d0bc96031e55459e0d6381 (diff)
Fix issue with Fl_Tiled_Image: did not correctly draw
... to sub-region of widget. Original patch (PR #114) modified by Albrecht-S: - fixed whitespace - removed modifications of test/unittest_images.cxx
Diffstat (limited to 'src')
-rw-r--r--src/Fl_Tiled_Image.cxx6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/Fl_Tiled_Image.cxx b/src/Fl_Tiled_Image.cxx
index 8451e062f..12bd7a659 100644
--- a/src/Fl_Tiled_Image.cxx
+++ b/src/Fl_Tiled_Image.cxx
@@ -1,7 +1,7 @@
//
// Tiled image code for the Fast Light Tool Kit (FLTK).
//
-// Copyright 1998-2015 by Bill Spitzak and others.
+// Copyright 1998-2020 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
@@ -182,9 +182,9 @@ Fl_Tiled_Image::draw(int X, // I - Starting X position
if (cx > 0) iw -= cx; // crop image
if (cy > 0) ih -= cy;
- for (int yy = Y; yy < H; yy += ih) {
+ for (int yy = Y; yy < Y+H; yy += ih) {
if (fl_not_clipped(X,yy,W,ih)) {
- for (int xx = X; xx < W; xx += iw) {
+ for (int xx = X; xx < X+W; xx += iw) {
if (fl_not_clipped(xx,yy,iw,ih)) {
image_->draw(xx,yy,iw,ih,cx,cy);
}