Exemple #1
0
        internal static PointD FromPointInfo(PointInfo point)
        {
            if (point == null)
            {
                return(default(PointD));
            }

            return(new PointD(point.X, point.Y));
        }
Exemple #2
0
            public static PointInfo GetCentroid(IntPtr instance)
            {
                IntPtr result;

                #if PLATFORM_AnyCPU
                if (OperatingSystem.Is64Bit)
                #endif
                #if PLATFORM_x64 || PLATFORM_AnyCPU
                result = NativeMethods.X64.ConnectedComponent_GetCentroid(instance);
                #endif
                #if PLATFORM_AnyCPU
                else
                #endif
                #if PLATFORM_x86 || PLATFORM_AnyCPU
                result = NativeMethods.X86.ConnectedComponent_GetCentroid(instance);
                #endif
                return(PointInfo.CreateInstance(result));
            }