Check() public static method

public static Check ( IntPtr exception ) : MagickException
exception System.IntPtr
return MagickException
示例#1
0
 public static void SetDefaultFontFile(string?fileName)
 {
     using (var fileNameNative = UTF8Marshaler.CreateInstance(fileName))
     {
         IntPtr exception = IntPtr.Zero;
         #if PLATFORM_AnyCPU
         if (OperatingSystem.IsArm64)
         #endif
         #if PLATFORM_arm64 || PLATFORM_AnyCPU
         NativeMethods.ARM64.Magick_SetDefaultFontFile(fileNameNative.Instance, out exception);
         #endif
         #if PLATFORM_AnyCPU
         else if (OperatingSystem.Is64Bit)
         #endif
         #if PLATFORM_x64 || PLATFORM_AnyCPU
         NativeMethods.X64.Magick_SetDefaultFontFile(fileNameNative.Instance, out exception);
         #endif
         #if PLATFORM_AnyCPU
         else
         #endif
         #if PLATFORM_x86 || PLATFORM_AnyCPU
         NativeMethods.X86.Magick_SetDefaultFontFile(fileNameNative.Instance, out exception);
         #endif
         MagickExceptionHelper.Check(exception);
     }
 }
示例#2
0
            public static bool SetUseOpenCL(bool value)
            {
                IntPtr exception = IntPtr.Zero;
                bool   result;

                if (NativeLibrary.Is64Bit)
                {
                    result = NativeMethods.X64.MagickNET_SetUseOpenCL(value, out exception);
                }
                else
                {
                    result = NativeMethods.X86.MagickNET_SetUseOpenCL(value, out exception);
                }
                MagickExceptionHelper.Check(exception);
                return(result);
            }
示例#3
0
        protected void CheckException(IntPtr exception)
        {
            MagickException magickException = MagickExceptionHelper.Check(exception);

            RaiseWarning(magickException);
        }