From 395a00614ecb66a51230cea44baa8c4fead36a80 Mon Sep 17 00:00:00 2001 From: Abou Al Montacir Date: Sat, 17 Jun 2023 10:36:32 +0200 Subject: [PATCH] gtk3: Fixed LineTo implementation. Closes #40323. The function `cairo_stroke` causes the current path to be cleared from the cairo context. Thus we loose the current position. We replace is with `cairo_stroke_preserve` in order to preserves the path within the cairo context. --- lcl/interfaces/gtk3/gtk3objects.pas | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lcl/interfaces/gtk3/gtk3objects.pas b/lcl/interfaces/gtk3/gtk3objects.pas index d2049817c0..91f710a3d2 100644 --- a/lcl/interfaces/gtk3/gtk3objects.pas +++ b/lcl/interfaces/gtk3/gtk3objects.pas @@ -2315,7 +2315,7 @@ begin end else cairo_line_to(pcr,X+PixelOffset, Y+PixelOffset); - cairo_stroke(pcr); + cairo_stroke_preserve(pcr); Result := True; end;