Skip to content

Commit

Permalink
native: remove out exception from DrawingSettings.SetAffine (#1519)
Browse files Browse the repository at this point in the history
  • Loading branch information
Gounlaf authored Jan 13, 2024
1 parent f912e0a commit 5676471
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions src/Magick.NET/Native/Settings/DrawingSettings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ public static class X64
[DllImport(NativeLibrary.X64Name, CallingConvention = CallingConvention.Cdecl)]
public static extern void DrawingSettings_SetFillPattern(IntPtr Instance, IntPtr value, out IntPtr exception);
[DllImport(NativeLibrary.X64Name, CallingConvention = CallingConvention.Cdecl)]
public static extern void DrawingSettings_SetAffine(IntPtr Instance, double scaleX, double scaleY, double shearX, double shearY, double translateX, double translateY, out IntPtr exception);
public static extern void DrawingSettings_SetAffine(IntPtr Instance, double scaleX, double scaleY, double shearX, double shearY, double translateX, double translateY);
[DllImport(NativeLibrary.X64Name, CallingConvention = CallingConvention.Cdecl)]
public static extern void DrawingSettings_SetStrokeDashArray(IntPtr Instance, double* dash, UIntPtr length);
[DllImport(NativeLibrary.X64Name, CallingConvention = CallingConvention.Cdecl)]
Expand Down Expand Up @@ -241,7 +241,7 @@ public static class ARM64
[DllImport(NativeLibrary.ARM64Name, CallingConvention = CallingConvention.Cdecl)]
public static extern void DrawingSettings_SetFillPattern(IntPtr Instance, IntPtr value, out IntPtr exception);
[DllImport(NativeLibrary.ARM64Name, CallingConvention = CallingConvention.Cdecl)]
public static extern void DrawingSettings_SetAffine(IntPtr Instance, double scaleX, double scaleY, double shearX, double shearY, double translateX, double translateY, out IntPtr exception);
public static extern void DrawingSettings_SetAffine(IntPtr Instance, double scaleX, double scaleY, double shearX, double shearY, double translateX, double translateY);
[DllImport(NativeLibrary.ARM64Name, CallingConvention = CallingConvention.Cdecl)]
public static extern void DrawingSettings_SetStrokeDashArray(IntPtr Instance, double* dash, UIntPtr length);
[DllImport(NativeLibrary.ARM64Name, CallingConvention = CallingConvention.Cdecl)]
Expand Down Expand Up @@ -354,7 +354,7 @@ public static class X86
[DllImport(NativeLibrary.X86Name, CallingConvention = CallingConvention.Cdecl)]
public static extern void DrawingSettings_SetFillPattern(IntPtr Instance, IntPtr value, out IntPtr exception);
[DllImport(NativeLibrary.X86Name, CallingConvention = CallingConvention.Cdecl)]
public static extern void DrawingSettings_SetAffine(IntPtr Instance, double scaleX, double scaleY, double shearX, double shearY, double translateX, double translateY, out IntPtr exception);
public static extern void DrawingSettings_SetAffine(IntPtr Instance, double scaleX, double scaleY, double shearX, double shearY, double translateX, double translateY);
[DllImport(NativeLibrary.X86Name, CallingConvention = CallingConvention.Cdecl)]
public static extern void DrawingSettings_SetStrokeDashArray(IntPtr Instance, double* dash, UIntPtr length);
[DllImport(NativeLibrary.X86Name, CallingConvention = CallingConvention.Cdecl)]
Expand Down Expand Up @@ -1531,26 +1531,24 @@ public void SetFillPattern(IMagickImage value)
}
public void SetAffine(double scaleX, double scaleY, double shearX, double shearY, double translateX, double translateY)
{
IntPtr exception = IntPtr.Zero;
#if PLATFORM_AnyCPU
if (Runtime.IsArm64)
#endif
#if PLATFORM_arm64 || PLATFORM_AnyCPU
NativeMethods.ARM64.DrawingSettings_SetAffine(Instance, scaleX, scaleY, shearX, shearY, translateX, translateY, out exception);
NativeMethods.ARM64.DrawingSettings_SetAffine(Instance, scaleX, scaleY, shearX, shearY, translateX, translateY);
#endif
#if PLATFORM_AnyCPU
else if (Runtime.Is64Bit)
#endif
#if PLATFORM_x64 || PLATFORM_AnyCPU
NativeMethods.X64.DrawingSettings_SetAffine(Instance, scaleX, scaleY, shearX, shearY, translateX, translateY, out exception);
NativeMethods.X64.DrawingSettings_SetAffine(Instance, scaleX, scaleY, shearX, shearY, translateX, translateY);
#endif
#if PLATFORM_AnyCPU
else
#endif
#if PLATFORM_x86 || PLATFORM_AnyCPU
NativeMethods.X86.DrawingSettings_SetAffine(Instance, scaleX, scaleY, shearX, shearY, translateX, translateY, out exception);
NativeMethods.X86.DrawingSettings_SetAffine(Instance, scaleX, scaleY, shearX, shearY, translateX, translateY);
#endif
CheckException(exception);
}
public void SetStrokeDashArray(double[] dash, int length)
{
Expand Down

0 comments on commit 5676471

Please sign in to comment.