From 3fbbce0654a2eb9ea67814c408593e15ccc4cd1c Mon Sep 17 00:00:00 2001 From: ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com> Date: Fri, 8 Nov 2024 09:46:35 +0100 Subject: [PATCH] Slightly improve member function Fl_Wayland_Graphics_Driver::copy_offscreen() --- src/drivers/Wayland/Fl_Wayland_Graphics_Driver.cxx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/drivers/Wayland/Fl_Wayland_Graphics_Driver.cxx b/src/drivers/Wayland/Fl_Wayland_Graphics_Driver.cxx index 912f9675c..0ac74ed98 100644 --- a/src/drivers/Wayland/Fl_Wayland_Graphics_Driver.cxx +++ b/src/drivers/Wayland/Fl_Wayland_Graphics_Driver.cxx @@ -264,8 +264,10 @@ void Fl_Wayland_Graphics_Driver::copy_offscreen(int x, int y, int w, int h, cairo_get_matrix(cairo_, &matrix); double s = matrix.xx; cairo_save(cairo_); - cairo_rectangle(cairo_, x, y, w, h); + cairo_rectangle(cairo_, x - 0.5, y - 0.5, w, h); + cairo_set_antialias(cairo_, CAIRO_ANTIALIAS_NONE); cairo_clip(cairo_); + cairo_set_antialias(cairo_, CAIRO_ANTIALIAS_DEFAULT); cairo_surface_t *surf = cairo_get_target((cairo_t *)src); cairo_pattern_t *pat = cairo_pattern_create_for_surface(surf); cairo_set_source(cairo_, pat);