Gtk3: fixed moveTo() when handling pen with width > 1. issue #41405

This commit is contained in:
zeljan1 2025-02-04 13:55:21 +01:00
parent 548f2b0657
commit 1a2bdc04d9

View File

@ -2741,9 +2741,16 @@ begin
OldPoint^.X := Round(dx);
OldPoint^.Y := Round(dy);
end;
cairo_move_to(pcr, X, Y);
FLastPenX := X;
FLastPenY := Y;
dx := X;
dy := Y;
if CurrentPen.Width > 1 then
begin
dx := X + PixelOffset;
dy := Y + PixelOffset;
end;
cairo_move_to(pcr, dx, dy);
FLastPenX := dx;
FLastPenY := dy;
//TODO: check if we need here cairo_get_current_point or we can assign it like above
//cairo_get_current_point(pcr,@FLastPenX,@FLastPenY);
Result := True;