Skip to content

Commit

Permalink
Make sure to marshal the SKMatrix as a reference closes #142
Browse files Browse the repository at this point in the history
  • Loading branch information
mattleibow committed Aug 23, 2016
1 parent 9483aea commit 975df65
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions binding/Binding/SKPathEffect.cs
Original file line number Diff line number Diff line change
Expand Up @@ -71,14 +71,14 @@ public static SKPathEffect Create1DPath(SKPath path, float advance, float phase,

public static SKPathEffect Create2DLine(float width, SKMatrix matrix)
{
return GetObject<SKPathEffect>(SkiaApi.sk_path_effect_create_2d_line(width, matrix));
return GetObject<SKPathEffect>(SkiaApi.sk_path_effect_create_2d_line(width, ref matrix));
}

public static SKPathEffect Create2DPath(SKMatrix matrix, SKPath path)
{
if (path == null)
throw new ArgumentNullException(nameof(path));
return GetObject<SKPathEffect>(SkiaApi.sk_path_effect_create_2d_path(matrix, path.Handle));
return GetObject<SKPathEffect>(SkiaApi.sk_path_effect_create_2d_path(ref matrix, path.Handle));
}

public static SKPathEffect CreateDash(float[] intervals, float phase)
Expand Down
4 changes: 2 additions & 2 deletions binding/Binding/SkiaApi.cs
Original file line number Diff line number Diff line change
Expand Up @@ -985,9 +985,9 @@ internal static class SkiaApi
[DllImport(SKIA, CallingConvention = CallingConvention.Cdecl)]
public extern static sk_path_effect_t sk_path_effect_create_1d_path(sk_path_t path, float advance, float phase, SkPath1DPathEffectStyle style);
[DllImport(SKIA, CallingConvention = CallingConvention.Cdecl)]
public extern static sk_path_effect_t sk_path_effect_create_2d_line(float width, SKMatrix matrix);
public extern static sk_path_effect_t sk_path_effect_create_2d_line(float width, ref SKMatrix matrix);
[DllImport(SKIA, CallingConvention = CallingConvention.Cdecl)]
public extern static sk_path_effect_t sk_path_effect_create_2d_path(SKMatrix matrix, sk_path_t path);
public extern static sk_path_effect_t sk_path_effect_create_2d_path(ref SKMatrix matrix, sk_path_t path);
[DllImport(SKIA, CallingConvention = CallingConvention.Cdecl)]
public extern static sk_path_effect_t sk_path_effect_create_dash(float[] intervals, int count, float phase);

Expand Down

0 comments on commit 975df65

Please sign in to comment.