Lines Matching refs:wand
77 WandExport void ClearMagickWand(MagickWand *wand) in ClearMagickWand() argument
79 assert(wand != (MagickWand *) NULL); in ClearMagickWand()
80 assert(wand->signature == MagickWandSignature); in ClearMagickWand()
81 if (wand->debug != MagickFalse) in ClearMagickWand()
82 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name); in ClearMagickWand()
83 wand->image_info=DestroyImageInfo(wand->image_info); in ClearMagickWand()
84 wand->images=DestroyImageList(wand->images); in ClearMagickWand()
85 wand->image_info=AcquireImageInfo(); in ClearMagickWand()
86 wand->insert_before=MagickFalse; in ClearMagickWand()
87 wand->image_pending=MagickFalse; in ClearMagickWand()
88 ClearMagickException(wand->exception); in ClearMagickWand()
89 wand->debug=IsEventLogging(); in ClearMagickWand()
114 WandExport MagickWand *CloneMagickWand(const MagickWand *wand) in CloneMagickWand() argument
119 assert(wand != (MagickWand *) NULL); in CloneMagickWand()
120 assert(wand->signature == MagickWandSignature); in CloneMagickWand()
121 if (wand->debug != MagickFalse) in CloneMagickWand()
122 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name); in CloneMagickWand()
126 wand->name); in CloneMagickWand()
132 InheritException(clone_wand->exception,wand->exception); in CloneMagickWand()
133 clone_wand->image_info=CloneImageInfo(wand->image_info); in CloneMagickWand()
134 clone_wand->images=CloneImageList(wand->images,clone_wand->exception); in CloneMagickWand()
166 WandExport MagickWand *DestroyMagickWand(MagickWand *wand) in DestroyMagickWand() argument
168 assert(wand != (MagickWand *) NULL); in DestroyMagickWand()
169 assert(wand->signature == MagickWandSignature); in DestroyMagickWand()
170 if (wand->debug != MagickFalse) in DestroyMagickWand()
171 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name); in DestroyMagickWand()
172 wand->images=DestroyImageList(wand->images); in DestroyMagickWand()
173 if (wand->image_info != (ImageInfo *) NULL ) in DestroyMagickWand()
174 wand->image_info=DestroyImageInfo(wand->image_info); in DestroyMagickWand()
175 if (wand->exception != (ExceptionInfo *) NULL ) in DestroyMagickWand()
176 wand->exception=DestroyExceptionInfo(wand->exception); in DestroyMagickWand()
177 RelinquishWandId(wand->id); in DestroyMagickWand()
178 wand->signature=(~MagickWandSignature); in DestroyMagickWand()
179 wand=(MagickWand *) RelinquishMagickMemory(wand); in DestroyMagickWand()
180 return(wand); in DestroyMagickWand()
205 WandExport MagickBooleanType IsMagickWand(const MagickWand *wand) in IsMagickWand() argument
207 if (wand == (const MagickWand *) NULL) in IsMagickWand()
209 if (wand->signature != MagickWandSignature) in IsMagickWand()
211 if (LocaleNCompare(wand->name,MagickWandId,strlen(MagickWandId)) != 0) in IsMagickWand()
238 WandExport MagickBooleanType MagickClearException(MagickWand *wand) in MagickClearException() argument
240 assert(wand != (MagickWand *) NULL); in MagickClearException()
241 assert(wand->signature == MagickWandSignature); in MagickClearException()
242 if (wand->debug != MagickFalse) in MagickClearException()
243 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name); in MagickClearException()
244 ClearMagickException(wand->exception); in MagickClearException()
273 WandExport char *MagickGetException(const MagickWand *wand, in MagickGetException() argument
279 assert(wand != (const MagickWand *) NULL); in MagickGetException()
280 assert(wand->signature == MagickWandSignature); in MagickGetException()
281 if (wand->debug != MagickFalse) in MagickGetException()
282 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name); in MagickGetException()
284 *severity=wand->exception->severity; in MagickGetException()
289 (void) ThrowMagickException(wand->exception,GetMagickModule(),WandError, in MagickGetException()
290 "MemoryAllocationFailed","`%s'",wand->name); in MagickGetException()
294 if (wand->exception->reason != (char *) NULL) in MagickGetException()
296 wand->exception->severity,wand->exception->reason),MagickPathExtent); in MagickGetException()
297 if (wand->exception->description != (char *) NULL) in MagickGetException()
301 wand->exception->severity,wand->exception->description),MagickPathExtent); in MagickGetException()
330 WandExport ExceptionType MagickGetExceptionType(const MagickWand *wand) in MagickGetExceptionType() argument
332 assert(wand != (MagickWand *) NULL); in MagickGetExceptionType()
333 assert(wand->signature == MagickWandSignature); in MagickGetExceptionType()
334 if (wand->debug != MagickFalse) in MagickGetExceptionType()
335 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name); in MagickGetExceptionType()
336 return(wand->exception->severity); in MagickGetExceptionType()
362 WandExport ssize_t MagickGetIteratorIndex(MagickWand *wand) in MagickGetIteratorIndex() argument
364 assert(wand != (MagickWand *) NULL); in MagickGetIteratorIndex()
365 assert(wand->signature == MagickWandSignature); in MagickGetIteratorIndex()
366 if (wand->debug != MagickFalse) in MagickGetIteratorIndex()
367 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name); in MagickGetIteratorIndex()
368 if (wand->images == (Image *) NULL) in MagickGetIteratorIndex()
370 (void) ThrowMagickException(wand->exception,GetMagickModule(),WandError, in MagickGetIteratorIndex()
371 "ContainsNoIterators","`%s'",wand->name); in MagickGetIteratorIndex()
374 return(GetImageIndexInList(wand->images)); in MagickGetIteratorIndex()
512 WandExport double *MagickQueryFontMetrics(MagickWand *wand, in MagickQueryFontMetrics() argument
527 assert(wand != (MagickWand *) NULL); in MagickQueryFontMetrics()
528 assert(wand->signature == MagickWandSignature); in MagickQueryFontMetrics()
529 if (wand->debug != MagickFalse) in MagickQueryFontMetrics()
530 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name); in MagickQueryFontMetrics()
532 if (wand->images == (Image *) NULL) in MagickQueryFontMetrics()
534 (void) ThrowMagickException(wand->exception,GetMagickModule(),WandError, in MagickQueryFontMetrics()
535 "ContainsNoImages","`%s'",wand->name); in MagickQueryFontMetrics()
549 status=GetTypeMetrics(wand->images,draw_info,&metrics,wand->exception); in MagickQueryFontMetrics()
619 WandExport double *MagickQueryMultilineFontMetrics(MagickWand *wand, in MagickQueryMultilineFontMetrics() argument
634 assert(wand != (MagickWand *) NULL); in MagickQueryMultilineFontMetrics()
635 assert(wand->signature == MagickWandSignature); in MagickQueryMultilineFontMetrics()
636 if (wand->debug != MagickFalse) in MagickQueryMultilineFontMetrics()
637 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name); in MagickQueryMultilineFontMetrics()
639 if (wand->images == (Image *) NULL) in MagickQueryMultilineFontMetrics()
641 (void) ThrowMagickException(wand->exception,GetMagickModule(),WandError, in MagickQueryMultilineFontMetrics()
642 "ContainsNoImages","`%s'",wand->name); in MagickQueryMultilineFontMetrics()
656 status=GetMultilineTypeMetrics(wand->images,draw_info,&metrics, in MagickQueryMultilineFontMetrics()
657 wand->exception); in MagickQueryMultilineFontMetrics()
823 WandExport void MagickResetIterator(MagickWand *wand) in MagickResetIterator() argument
825 assert(wand != (MagickWand *) NULL); in MagickResetIterator()
826 assert(wand->signature == MagickWandSignature); in MagickResetIterator()
827 if (wand->debug != MagickFalse) in MagickResetIterator()
828 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name); in MagickResetIterator()
829 wand->images=GetFirstImageInList(wand->images); in MagickResetIterator()
830 wand->insert_before=MagickFalse; /* Insert/add after current (first) image */ in MagickResetIterator()
831 wand->image_pending=MagickTrue; /* NextImage will set first image */ in MagickResetIterator()
867 WandExport void MagickSetFirstIterator(MagickWand *wand) in MagickSetFirstIterator() argument
869 assert(wand != (MagickWand *) NULL); in MagickSetFirstIterator()
870 assert(wand->signature == MagickWandSignature); in MagickSetFirstIterator()
871 if (wand->debug != MagickFalse) in MagickSetFirstIterator()
872 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name); in MagickSetFirstIterator()
873 wand->images=GetFirstImageInList(wand->images); in MagickSetFirstIterator()
874 wand->insert_before=MagickTrue; /* Insert/add before the first image */ in MagickSetFirstIterator()
875 wand->image_pending=MagickFalse; /* NextImage will set next image */ in MagickSetFirstIterator()
919 WandExport MagickBooleanType MagickSetIteratorIndex(MagickWand *wand, in MagickSetIteratorIndex() argument
925 assert(wand != (MagickWand *) NULL); in MagickSetIteratorIndex()
926 assert(wand->signature == MagickWandSignature); in MagickSetIteratorIndex()
927 if (wand->debug != MagickFalse) in MagickSetIteratorIndex()
928 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name); in MagickSetIteratorIndex()
929 if (wand->images == (Image *) NULL) in MagickSetIteratorIndex()
931 image=GetImageFromList(wand->images,index); in MagickSetIteratorIndex()
934 wand->images=image; in MagickSetIteratorIndex()
935 wand->insert_before=MagickFalse; /* Insert/Add after (this) image */ in MagickSetIteratorIndex()
936 wand->image_pending=MagickFalse; /* NextImage will set next image */ in MagickSetIteratorIndex()
970 WandExport void MagickSetLastIterator(MagickWand *wand) in MagickSetLastIterator() argument
972 assert(wand != (MagickWand *) NULL); in MagickSetLastIterator()
973 assert(wand->signature == MagickWandSignature); in MagickSetLastIterator()
974 if (wand->debug != MagickFalse) in MagickSetLastIterator()
975 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name); in MagickSetLastIterator()
976 wand->images=GetLastImageInList(wand->images); in MagickSetLastIterator()
977 wand->insert_before=MagickFalse; /* Insert/add after current (last) image */ in MagickSetLastIterator()
978 wand->image_pending=MagickTrue; /* PreviousImage will return last image */ in MagickSetLastIterator()
1056 *wand; in NewMagickWand() local
1065 wand=(MagickWand *) AcquireMagickMemory(sizeof(*wand)); in NewMagickWand()
1066 if (wand == (MagickWand *) NULL) in NewMagickWand()
1069 (void) ResetMagickMemory(wand,0,sizeof(*wand)); in NewMagickWand()
1070 wand->id=AcquireWandId(); in NewMagickWand()
1071 (void) FormatLocaleString(wand->name,MagickPathExtent,"%s-%.20g",MagickWandId, in NewMagickWand()
1072 (double) wand->id); in NewMagickWand()
1073 wand->images=NewImageList(); in NewMagickWand()
1074 wand->image_info=AcquireImageInfo(); in NewMagickWand()
1075 wand->exception=AcquireExceptionInfo(); in NewMagickWand()
1076 wand->debug=IsEventLogging(); in NewMagickWand()
1077 if (wand->debug != MagickFalse) in NewMagickWand()
1078 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name); in NewMagickWand()
1079 wand->signature=MagickWandSignature; in NewMagickWand()
1080 return(wand); in NewMagickWand()
1108 *wand; in NewMagickWandFromImage() local
1110 wand=NewMagickWand(); in NewMagickWandFromImage()
1111 wand->images=CloneImage(image,0,0,MagickTrue,wand->exception); in NewMagickWandFromImage()
1112 return(wand); in NewMagickWandFromImage()