From bf470919f7ce9eff87789192e3643d13f3404a03 Mon Sep 17 00:00:00 2001 From: ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com> Date: Thu, 25 Nov 2021 09:12:08 +0100 Subject: Fix X11 platform bug when drawing transparent RGB image without XRender. The bug would appear with test/device and when scaling up to 133% or above: the background of the Porsche pixmap would be truncated. The bug requires to set OPTION_XRENDERER=0 to appear. --- src/drivers/Xlib/Fl_Xlib_Graphics_Driver_image.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/drivers/Xlib/Fl_Xlib_Graphics_Driver_image.cxx b/src/drivers/Xlib/Fl_Xlib_Graphics_Driver_image.cxx index 3b431e7dc..216f5826a 100644 --- a/src/drivers/Xlib/Fl_Xlib_Graphics_Driver_image.cxx +++ b/src/drivers/Xlib/Fl_Xlib_Graphics_Driver_image.cxx @@ -746,6 +746,7 @@ void Fl_Xlib_Graphics_Driver::draw_fixed(Fl_RGB_Image *img, int X, int Y, int W, return; } // Composite image with alpha manually each time... + push_no_clip(); float s = scale(); Fl_Graphics_Driver::scale(1); int ox = offset_x_, oy = offset_y_; @@ -754,12 +755,11 @@ void Fl_Xlib_Graphics_Driver::draw_fixed(Fl_RGB_Image *img, int X, int Y, int W, int nscreen = Fl_Window_Driver::driver(Fl_Window::current())->screen_num(); float keep = d->scale(nscreen); d->scale(nscreen, 1); - push_no_clip(); alpha_blend(img, X, Y, W, H, cx, cy); - pop_clip(); d->scale(nscreen, keep); Fl_Graphics_Driver::scale(s); offset_x_ = ox; offset_y_ = oy; + pop_clip(); } #if HAVE_XRENDER -- cgit v1.2.3