/*
- 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
{
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 */