From a92fbec43a20026f9f0ecc0fd7b85be7cce3a7a2 Mon Sep 17 00:00:00 2001 From: ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com> Date: Tue, 10 Mar 2026 16:00:34 +0100 Subject: [PATCH] Improve drawing of part of Fl_RGB_Image while scaling display (#1370) --- src/Fl_Image.cxx | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/Fl_Image.cxx b/src/Fl_Image.cxx index 991773cbd..80c34f7c1 100644 --- a/src/Fl_Image.cxx +++ b/src/Fl_Image.cxx @@ -879,8 +879,7 @@ static void crect_intersect(rectangle_int_t *to, rectangle_int_t *with) { void Fl_RGB_Image::draw(int XP, int YP, int WP, int HP, int cx, int cy) { - float s = fl_graphics_driver->scale(); - if (s != int(s) && (cx || cy || WP != w() || HP != h()) && w() == data_w() && h() == data_h()) { + if ((cx || cy || WP != w() || HP != h()) && w() == data_w() && h() == data_h()) { // See issue #1128: clipping to a part of the image while the scaling // has a fractional value creates problems rectangle_int_t r1 = { XP-cx, YP-cy, w(), h() };