summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com>2020-11-10 21:03:35 +0100
committerManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com>2020-11-10 21:03:48 +0100
commitdf9749e6a8a72da60d80d9f519377f3c12a9409e (patch)
tree4015eb0533d38f995860761b0595283b3e6638fa /src
parent7b6d0a81968fe91d7c824f9eb3821981e87fd1fc (diff)
Fix for issue #155 "SVG rendering spoiled by scaling".
Diffstat (limited to 'src')
-rw-r--r--src/Fl_Image.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/Fl_Image.cxx b/src/Fl_Image.cxx
index c09a77f3a..d38148c8d 100644
--- a/src/Fl_Image.cxx
+++ b/src/Fl_Image.cxx
@@ -275,8 +275,8 @@ void Fl_Image::scale(int width, int height, int proportional, int can_expand)
if (fw < 1) fw = 1;
if (fh < 1) fh = 1;
}
- w_ = int(data_w() / fw);
- h_ = int(data_h() / fh);
+ w_ = int((data_w() / fw) + 0.5);
+ h_ = int((data_h() / fh) + 0.5);
}
/** Draw the image to the current drawing surface rescaled to a given width and height.