summaryrefslogtreecommitdiff
path: root/src/Fl_Shared_Image.cxx
diff options
context:
space:
mode:
authorManolo Gouy <Manolo>2017-10-12 13:05:00 +0000
committerManolo Gouy <Manolo>2017-10-12 13:05:00 +0000
commita526818778f1e378dbcfe300dc5ab42df023adfe (patch)
tree07558ebf1515cc10ae8924be862b1b13a77b0885 /src/Fl_Shared_Image.cxx
parent193c611fc2e482b3ae9e2d2d4518ce88eb399d49 (diff)
Remove undesired rounding when Fl_Shared_Image::scale() is called with proportional = 0.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12488 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src/Fl_Shared_Image.cxx')
-rw-r--r--src/Fl_Shared_Image.cxx2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/Fl_Shared_Image.cxx b/src/Fl_Shared_Image.cxx
index a4cfd30b8..4eea49e76 100644
--- a/src/Fl_Shared_Image.cxx
+++ b/src/Fl_Shared_Image.cxx
@@ -401,6 +401,8 @@ void Fl_Shared_Image::scale(int width, int height, int proportional, int can_exp
w(width);
h(height);
if (!image_ || image_->fail()) return;
+ if (!proportional && can_expand) return;
+ if (!proportional && width <= image_->w() && height <= image_->h()) return;
float fw = image_->w() / float(width);
float fh = image_->h() / float(height);
if (proportional) {