public static string Description(IntPtr exception) { if (NativeLibrary.Is64Bit) { return(UTF8Marshaler.NativeToManaged(NativeMethods.X64.MagickExceptionHelper_Description(exception))); } else { return(UTF8Marshaler.NativeToManaged(NativeMethods.X86.MagickExceptionHelper_Description(exception))); } }
private static void OnLog(UIntPtr type, IntPtr text) { if (_log == null) { return; } string managedText = UTF8Marshaler.NativeToManaged(text); _log(null, new LogEventArgs((LogEvents)type, managedText)); }
public string RemoveOption(string key) { using (INativeInstance keyNative = UTF8Marshaler.CreateInstance(key)) { if (NativeLibrary.Is64Bit) { return(UTF8Marshaler.NativeToManaged(NativeMethods.X64.MagickSettings_RemoveOption(Instance, keyNative.Instance))); } else { return(UTF8Marshaler.NativeToManaged(NativeMethods.X86.MagickSettings_RemoveOption(Instance, keyNative.Instance))); } } }
public static string GetFontFamily(IntPtr instance, int index) { #if PLATFORM_AnyCPU if (NativeLibrary.Is64Bit) #endif #if PLATFORM_x64 || PLATFORM_AnyCPU return(UTF8Marshaler.NativeToManaged(NativeMethods.X64.Magick_GetFontFamily(instance, (UIntPtr)index))); #endif #if PLATFORM_AnyCPU else #endif #if PLATFORM_x86 || PLATFORM_AnyCPU return(UTF8Marshaler.NativeToManaged(NativeMethods.X86.Magick_GetFontFamily(instance, (UIntPtr)index))); #endif }
public static string Message(IntPtr exception) { #if PLATFORM_AnyCPU if (NativeLibrary.Is64Bit) #endif #if PLATFORM_x64 || PLATFORM_AnyCPU return(UTF8Marshaler.NativeToManaged(NativeMethods.X64.MagickExceptionHelper_Message(exception))); #endif #if PLATFORM_AnyCPU else #endif #if PLATFORM_x86 || PLATFORM_AnyCPU return(UTF8Marshaler.NativeToManaged(NativeMethods.X86.MagickExceptionHelper_Message(exception))); #endif }
public static string Description(IntPtr exception) { #if ANYCPU if (NativeLibrary.Is64Bit) #endif #if WIN64 || ANYCPU return UTF8Marshaler.NativeToManaged(NativeMethods.X64.MagickExceptionHelper_Description(exception)); #endif #if ANYCPU else #endif #if !WIN64 || ANYCPU return UTF8Marshaler.NativeToManaged(NativeMethods.X86.MagickExceptionHelper_Description(exception)); #endif }
public static string?Description(IntPtr exception) { #if PLATFORM_AnyCPU if (OperatingSystem.Is64Bit) #endif #if PLATFORM_x64 || PLATFORM_AnyCPU return(UTF8Marshaler.NativeToManaged(NativeMethods.X64.MagickExceptionHelper_Description(exception))); #endif #if PLATFORM_AnyCPU else #endif #if PLATFORM_x86 || PLATFORM_AnyCPU return(UTF8Marshaler.NativeToManaged(NativeMethods.X86.MagickExceptionHelper_Description(exception))); #endif }
public static string?GetFontName(IntPtr instance, int index) { #if PLATFORM_AnyCPU if (OperatingSystem.Is64Bit) #endif #if PLATFORM_x64 || PLATFORM_AnyCPU return(UTF8Marshaler.NativeToManaged(NativeMethods.X64.Magick_GetFontName(instance, (UIntPtr)index))); #endif #if PLATFORM_AnyCPU else #endif #if PLATFORM_x86 || PLATFORM_AnyCPU return(UTF8Marshaler.NativeToManaged(NativeMethods.X86.Magick_GetFontName(instance, (UIntPtr)index))); #endif }
public static string?GetFontFamily(IntPtr instance, int index) { IntPtr result; #if PLATFORM_AnyCPU if (OperatingSystem.IsArm64) #endif #if PLATFORM_arm64 || PLATFORM_AnyCPU result = NativeMethods.ARM64.Magick_GetFontFamily(instance, (UIntPtr)index); #endif #if PLATFORM_AnyCPU else if (OperatingSystem.Is64Bit) #endif #if PLATFORM_x64 || PLATFORM_AnyCPU result = NativeMethods.X64.Magick_GetFontFamily(instance, (UIntPtr)index); #endif #if PLATFORM_AnyCPU else #endif #if PLATFORM_x86 || PLATFORM_AnyCPU result = NativeMethods.X86.Magick_GetFontFamily(instance, (UIntPtr)index); #endif return(UTF8Marshaler.NativeToManaged(result)); }
public static string?Description(IntPtr exception) { IntPtr result; #if PLATFORM_AnyCPU if (OperatingSystem.IsArm64) #endif #if PLATFORM_arm64 || PLATFORM_AnyCPU result = NativeMethods.ARM64.MagickExceptionHelper_Description(exception); #endif #if PLATFORM_AnyCPU else if (OperatingSystem.Is64Bit) #endif #if PLATFORM_x64 || PLATFORM_AnyCPU result = NativeMethods.X64.MagickExceptionHelper_Description(exception); #endif #if PLATFORM_AnyCPU else #endif #if PLATFORM_x86 || PLATFORM_AnyCPU result = NativeMethods.X86.MagickExceptionHelper_Description(exception); #endif return(UTF8Marshaler.NativeToManaged(result)); }