]> granicus.if.org Git - imagemagick/blobdiff - MagickWand/magick-wand-private.h
...
[imagemagick] / MagickWand / magick-wand-private.h
index af4c45be1956449896392f3a2ca4b9f2431e9d0f..e89518fa98350482c99200ae2e80786a829e0b4f 100644 (file)
@@ -1,5 +1,5 @@
 /*
-  Copyright 1999-2012 ImageMagick Studio LLC, a non-profit organization
+  Copyright 1999-2017 ImageMagick Studio LLC, a non-profit organization
   dedicated to making software imaging solutions freely available.
   
   You may not use this file except in compliance with the License.
 
   ImageMagick pixel wand API.
 */
-#ifndef _MAGICKWAND_MAGICK_WAND_PRIVATE_H
-#define _MAGICKWAND_MAGICK_WAND_PRIVATE_H
+#ifndef MAGICKWAND_MAGICK_WAND_PRIVATE_H
+#define MAGICKWAND_MAGICK_WAND_PRIVATE_H
 
 #if defined(__cplusplus) || defined(c_plusplus)
 extern "C" {
 #endif
 
-#define DegreesToRadians(x)  (MagickPI*(x)/180.0)
 #define MagickWandId  "MagickWand"
 #define QuantumTick(i,span) ((MagickBooleanType) ((((i) & ((i)-1)) == 0) || \
    (((i) & 0xfff) == 0) || \
    ((MagickOffsetType) (i) == ((MagickOffsetType) (span)-1))))
-#define RadiansToDegrees(x) (180.0*(x)/MagickPI)
+#define ThrowWandException(severity,tag,context) \
+{ \
+  (void) ThrowMagickException(wand->exception,GetMagickModule(),severity, \
+    tag,"`%s'",context); \
+  return(MagickFalse); \
+}
+#define ThrowWandFatalException(severity,tag,context) \
+{ \
+  ExceptionInfo \
+    *fatal_exception; \
+ \
+  fatal_exception=AcquireExceptionInfo(); \
+  (void) ThrowMagickException(fatal_exception,GetMagickModule(),severity,tag, \
+    "`%s'",context); \
+  CatchException(fatal_exception); \
+  (void) DestroyExceptionInfo(fatal_exception); \
+  MagickWandTerminus(); \
+  _exit((int) (severity-FatalErrorException)+1); \
+} 
 
 struct _MagickWand
 {
@@ -35,7 +52,7 @@ struct _MagickWand
     id;
 
   char
-    name[MaxTextExtent];  /* Wand name to use for MagickWand Logs */
+    name[MagickPathExtent];  /* Wand name to use for MagickWand Logs */
 
   Image
     *images;          /* The images in this wand - also the current image */