18 #ifndef MAGICKWAND_MAGICK_WAND_PRIVATE_H
19 #define MAGICKWAND_MAGICK_WAND_PRIVATE_H
21 #if defined(__cplusplus) || defined(c_plusplus)
25 #define MagickPI 3.14159265358979323846264338327950288419716939937510
26 #define MagickWandId "MagickWand"
27 #define QuantumTick(i,span) ((MagickBooleanType) ((((i) & ((i)-1)) == 0) || \
28 (((i) & 0xfff) == 0) || \
29 ((MagickOffsetType) (i) == ((MagickOffsetType) (span)-1))))
30 #define ThrowWandException(severity,tag,context) \
32 (void) ThrowMagickException(wand->exception,GetMagickModule(),severity, \
33 tag,"`%s'",context); \
34 return(MagickFalse); \
36 #define ThrowWandFatalException(severity,tag,context) \
38 ExceptionInfo *fatal_exception = AcquireExceptionInfo(); \
39 char *message = GetExceptionMessage(errno); \
40 (void) ThrowMagickException(fatal_exception,GetMagickModule(),severity,tag, \
41 "`%s'",context == (char *) NULL ? message : context); \
42 message=DestroyString(message); \
43 CatchException(fatal_exception); \
44 (void) DestroyExceptionInfo(fatal_exception); \
45 MagickWandTerminus(); \
46 _exit((int) (severity-FatalErrorException)+1); \
78 #if defined(__cplusplus) || defined(c_plusplus)