summaryrefslogtreecommitdiff
path: root/src/drivers/Xlib/Fl_Xlib_Graphics_Driver_image.cxx
diff options
context:
space:
mode:
authorManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com>2021-11-25 09:12:08 +0100
committerManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com>2021-11-25 09:12:08 +0100
commitbf470919f7ce9eff87789192e3643d13f3404a03 (patch)
tree68ab7e154770e36f5353c5864919f3463beb03a3 /src/drivers/Xlib/Fl_Xlib_Graphics_Driver_image.cxx
parenta900411ee26ec1e40b82c833c7b9855948dd1e6b (diff)
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.
Diffstat (limited to 'src/drivers/Xlib/Fl_Xlib_Graphics_Driver_image.cxx')
-rw-r--r--src/drivers/Xlib/Fl_Xlib_Graphics_Driver_image.cxx4
1 files changed, 2 insertions, 2 deletions
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