From a4c12fa8049edf2250a4478c72e48de2b2fc8aa2 Mon Sep 17 00:00:00 2001 From: Matthew Leibowitz Date: Wed, 13 Mar 2024 13:14:25 +0200 Subject: [PATCH] This way --- binding/SkiaSharp/SKPath.cs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/binding/SkiaSharp/SKPath.cs b/binding/SkiaSharp/SKPath.cs index 556e66b1af4..d4b36fbe8c7 100644 --- a/binding/SkiaSharp/SKPath.cs +++ b/binding/SkiaSharp/SKPath.cs @@ -181,8 +181,11 @@ public bool Contains (float x, float y) => public void Offset (SKPoint offset) => Offset (offset.X, offset.Y); - public void Offset (float dx, float dy) => - Transform (in SKMatrix.CreateTranslation (dx, dy)); + public void Offset (float dx, float dy) + { + var matrix = SKMatrix.CreateTranslation (dx, dy); + Transform (in matrix); + } public void MoveTo (SKPoint point) => SkiaApi.sk_path_move_to (Handle, point.X, point.Y);