|
|
commit cdda89455c6767b5f43628b1c9e45b2dc8f0d971
Author: fire-eggs <lifeattickville@gmail.com>
AuthorDate: Mon Jul 20 15:22:00 2020 -0400
Commit: Albrecht Schlosser <albrechts.fltk@online.de>
CommitDate: Tue Sep 1 13:15:51 2020 +0200
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
src/Fl_Tiled_Image.cxx | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git src/Fl_Tiled_Image.cxx src/Fl_Tiled_Image.cxx
index 8451e06..12bd7a6 100644
--- src/Fl_Tiled_Image.cxx
+++ 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);
}
[ Direct Link to Message ] | |
|
| |