Skip to content

Commit

Permalink
The return type of the Area property of ConnectedComponent was change…
Browse files Browse the repository at this point in the history
…d in the Native library.
  • Loading branch information
dlemstra committed Sep 20, 2019
1 parent b533660 commit 6790fdb
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
10 changes: 5 additions & 5 deletions src/Magick.NET/Native/Types/ConnectedComponent.cs
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ public static class X64
[DllImport(NativeLibrary.X64Name, CallingConvention = CallingConvention.Cdecl)]
public static extern void ConnectedComponent_DisposeList(IntPtr list);
[DllImport(NativeLibrary.X64Name, CallingConvention = CallingConvention.Cdecl)]
public static extern double ConnectedComponent_GetArea(IntPtr instance);
public static extern UIntPtr ConnectedComponent_GetArea(IntPtr instance);
[DllImport(NativeLibrary.X64Name, CallingConvention = CallingConvention.Cdecl)]
public static extern IntPtr ConnectedComponent_GetCentroid(IntPtr instance);
[DllImport(NativeLibrary.X64Name, CallingConvention = CallingConvention.Cdecl)]
Expand Down Expand Up @@ -74,7 +74,7 @@ public static class X86
[DllImport(NativeLibrary.X86Name, CallingConvention = CallingConvention.Cdecl)]
public static extern void ConnectedComponent_DisposeList(IntPtr list);
[DllImport(NativeLibrary.X86Name, CallingConvention = CallingConvention.Cdecl)]
public static extern double ConnectedComponent_GetArea(IntPtr instance);
public static extern UIntPtr ConnectedComponent_GetArea(IntPtr instance);
[DllImport(NativeLibrary.X86Name, CallingConvention = CallingConvention.Cdecl)]
public static extern IntPtr ConnectedComponent_GetCentroid(IntPtr instance);
[DllImport(NativeLibrary.X86Name, CallingConvention = CallingConvention.Cdecl)]
Expand Down Expand Up @@ -112,19 +112,19 @@ public static void DisposeList(IntPtr list)
NativeMethods.X86.ConnectedComponent_DisposeList(list);
#endif
}
public static double GetArea(IntPtr instance)
public static int GetArea(IntPtr instance)
{
#if PLATFORM_AnyCPU
if (NativeLibrary.Is64Bit)
#endif
#if PLATFORM_x64 || PLATFORM_AnyCPU
return NativeMethods.X64.ConnectedComponent_GetArea(instance);
return (int)NativeMethods.X64.ConnectedComponent_GetArea(instance);
#endif
#if PLATFORM_AnyCPU
else
#endif
#if PLATFORM_x86 || PLATFORM_AnyCPU
return NativeMethods.X86.ConnectedComponent_GetArea(instance);
return (int)NativeMethods.X86.ConnectedComponent_GetArea(instance);
#endif
}
public static PointInfo GetCentroid(IntPtr instance)
Expand Down
2 changes: 1 addition & 1 deletion src/Magick.NET/Native/Types/ConnectedComponent.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
},
{
"name": "GetArea",
"type": "double",
"type": "size_t",
"static": true,
"arguments": [
{
Expand Down
2 changes: 1 addition & 1 deletion src/Magick.NET/Shared/Types/ConnectedComponent.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ public sealed partial class ConnectedComponent
{
private ConnectedComponent(IntPtr instance)
{
Area = (int)NativeConnectedComponent.GetArea(instance);
Area = NativeConnectedComponent.GetArea(instance);
Centroid = PointD.FromPointInfo(NativeConnectedComponent.GetCentroid(instance));
Color = NativeConnectedComponent.GetColor(instance);
Height = NativeConnectedComponent.GetHeight(instance);
Expand Down

0 comments on commit 6790fdb

Please sign in to comment.