% MagickWand Wand View Methods %
% %
% Software Design %
-% John Cristy %
+% Cristy %
% March 2003 %
% %
% %
-% Copyright 1999-2014 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. You may %
id;
char
- name[MaxTextExtent],
+ name[MagickPathExtent],
*description;
RectangleInfo
i;
assert(wand_view != (WandView *) NULL);
- assert(wand_view->signature == WandSignature);
+ assert(wand_view->signature == MagickWandSignature);
if (wand_view->debug != MagickFalse)
(void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand_view->name);
clone_view=(WandView *) AcquireMagickMemory(sizeof(*clone_view));
wand_view->name);
(void) ResetMagickMemory(clone_view,0,sizeof(*clone_view));
clone_view->id=AcquireWandId();
- (void) FormatLocaleString(clone_view->name,MaxTextExtent,"%s-%.20g",
+ (void) FormatLocaleString(clone_view->name,MagickPathExtent,"%s-%.20g",
WandViewId,(double) clone_view->id);
clone_view->description=ConstantString(wand_view->description);
clone_view->image=CloneImage(wand_view->image,0,0,MagickTrue,
clone_view->debug=wand_view->debug;
if (clone_view->debug != MagickFalse)
(void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",clone_view->name);
- clone_view->signature=WandSignature;
+ clone_view->signature=MagickWandSignature;
return(clone_view);
}
\f
WandExport WandView *DestroyWandView(WandView *wand_view)
{
assert(wand_view != (WandView *) NULL);
- assert(wand_view->signature == WandSignature);
+ assert(wand_view->signature == MagickWandSignature);
wand_view->pixel_wands=DestroyPixelsThreadSet(wand_view->pixel_wands,
wand_view->extent.width);
wand_view->image=DestroyImage(wand_view->image);
wand_view->view=DestroyCacheView(wand_view->view);
wand_view->exception=DestroyExceptionInfo(wand_view->exception);
- wand_view->signature=(~WandSignature);
+ wand_view->signature=(~MagickWandSignature);
RelinquishWandId(wand_view->id);
wand_view=(WandView *) RelinquishMagickMemory(wand_view);
return(wand_view);
y;
assert(source != (WandView *) NULL);
- assert(source->signature == WandSignature);
+ assert(source->signature == MagickWandSignature);
if (transfer == (DuplexTransferWandViewMethod) NULL)
return(MagickFalse);
source_image=source->wand->images;
sync;
register const Quantum
- *restrict duplex_pixels,
- *restrict pixels;
+ *magick_restrict duplex_pixels,
+ *magick_restrict pixels;
register ssize_t
x;
register Quantum
- *restrict destination_pixels;
+ *magick_restrict destination_pixels;
if (status == MagickFalse)
continue;
*description;
assert(wand_view != (const WandView *) NULL);
- assert(wand_view->signature == WandSignature);
+ assert(wand_view->signature == MagickWandSignature);
if (wand_view->debug != MagickFalse)
(void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand_view->name);
assert(severity != (ExceptionType *) NULL);
*severity=wand_view->exception->severity;
- description=(char *) AcquireQuantumMemory(2UL*MaxTextExtent,
+ description=(char *) AcquireQuantumMemory(2UL*MagickPathExtent,
sizeof(*description));
if (description == (char *) NULL)
ThrowWandFatalException(ResourceLimitFatalError,"MemoryAllocationFailed",
if (wand_view->exception->reason != (char *) NULL)
(void) CopyMagickString(description,GetLocaleExceptionMessage(
wand_view->exception->severity,wand_view->exception->reason),
- MaxTextExtent);
+ MagickPathExtent);
if (wand_view->exception->description != (char *) NULL)
{
- (void) ConcatenateMagickString(description," (",MaxTextExtent);
+ (void) ConcatenateMagickString(description," (",MagickPathExtent);
(void) ConcatenateMagickString(description,GetLocaleExceptionMessage(
wand_view->exception->severity,wand_view->exception->description),
- MaxTextExtent);
- (void) ConcatenateMagickString(description,")",MaxTextExtent);
+ MagickPathExtent);
+ (void) ConcatenateMagickString(description,")",MagickPathExtent);
}
return(description);
}
WandExport RectangleInfo GetWandViewExtent(const WandView *wand_view)
{
assert(wand_view != (WandView *) NULL);
- assert(wand_view->signature == WandSignature);
+ assert(wand_view->signature == MagickWandSignature);
return(wand_view->extent);
}
\f
y;
assert(source != (WandView *) NULL);
- assert(source->signature == WandSignature);
+ assert(source->signature == MagickWandSignature);
if (get == (GetWandViewMethod) NULL)
return(MagickFalse);
source_image=source->wand->images;
id = GetOpenMPThreadId();
assert(wand_view != (WandView *) NULL);
- assert(wand_view->signature == WandSignature);
+ assert(wand_view->signature == MagickWandSignature);
return(wand_view->pixel_wands[id]);
}
\f
WandExport MagickWand *GetWandViewWand(const WandView *wand_view)
{
assert(wand_view != (WandView *) NULL);
- assert(wand_view->signature == WandSignature);
+ assert(wand_view->signature == MagickWandSignature);
return(wand_view->wand);
}
\f
if (wand_view == (const WandView *) NULL)
return(MagickFalse);
- if (wand_view->signature != WandSignature)
+ if (wand_view->signature != MagickWandSignature)
return(MagickFalse);
length=strlen(WandViewId);
if (LocaleNCompare(wand_view->name,WandViewId,length) != 0)
*wand_view;
assert(wand != (MagickWand *) NULL);
- assert(wand->signature == WandSignature);
+ assert(wand->signature == MagickWandSignature);
wand_view=(WandView *) AcquireMagickMemory(sizeof(*wand_view));
if (wand_view == (WandView *) NULL)
ThrowWandFatalException(ResourceLimitFatalError,"MemoryAllocationFailed",
GetExceptionMessage(errno));
(void) ResetMagickMemory(wand_view,0,sizeof(*wand_view));
wand_view->id=AcquireWandId();
- (void) FormatLocaleString(wand_view->name,MaxTextExtent,"%s-%.20g",
+ (void) FormatLocaleString(wand_view->name,MagickPathExtent,"%s-%.20g",
WandViewId,(double) wand_view->id);
wand_view->description=ConstantString("WandView");
wand_view->wand=wand;
ThrowWandFatalException(ResourceLimitFatalError,"MemoryAllocationFailed",
GetExceptionMessage(errno));
wand_view->debug=IsEventLogging();
- wand_view->signature=WandSignature;
+ wand_view->signature=MagickWandSignature;
return(wand_view);
}
\f
*wand_view;
assert(wand != (MagickWand *) NULL);
- assert(wand->signature == WandSignature);
+ assert(wand->signature == MagickWandSignature);
wand_view=(WandView *) AcquireMagickMemory(sizeof(*wand_view));
if (wand_view == (WandView *) NULL)
ThrowWandFatalException(ResourceLimitFatalError,"MemoryAllocationFailed",
GetExceptionMessage(errno));
(void) ResetMagickMemory(wand_view,0,sizeof(*wand_view));
wand_view->id=AcquireWandId();
- (void) FormatLocaleString(wand_view->name,MaxTextExtent,"%s-%.20g",
+ (void) FormatLocaleString(wand_view->name,MagickPathExtent,"%s-%.20g",
WandViewId,(double) wand_view->id);
wand_view->description=ConstantString("WandView");
exception=AcquireExceptionInfo();
ThrowWandFatalException(ResourceLimitFatalError,"MemoryAllocationFailed",
GetExceptionMessage(errno));
wand_view->debug=IsEventLogging();
- wand_view->signature=WandSignature;
+ wand_view->signature=MagickWandSignature;
return(wand_view);
}
\f
const char *description)
{
assert(wand_view != (WandView *) NULL);
- assert(wand_view->signature == WandSignature);
+ assert(wand_view->signature == MagickWandSignature);
wand_view->description=ConstantString(description);
}
\f
y;
assert(destination != (WandView *) NULL);
- assert(destination->signature == WandSignature);
+ assert(destination->signature == MagickWandSignature);
if (set == (SetWandViewMethod) NULL)
return(MagickFalse);
destination_image=destination->wand->images;
x;
register Quantum
- *restrict pixels;
+ *magick_restrict pixels;
if (status == MagickFalse)
continue;
y;
assert(source != (WandView *) NULL);
- assert(source->signature == WandSignature);
+ assert(source->signature == MagickWandSignature);
if (transfer == (TransferWandViewMethod) NULL)
return(MagickFalse);
source_image=source->wand->images;
sync;
register const Quantum
- *restrict pixels;
+ *magick_restrict pixels;
register ssize_t
x;
register Quantum
- *restrict destination_pixels;
+ *magick_restrict destination_pixels;
if (status == MagickFalse)
continue;
y;
assert(source != (WandView *) NULL);
- assert(source->signature == WandSignature);
+ assert(source->signature == MagickWandSignature);
if (update == (UpdateWandViewMethod) NULL)
return(MagickFalse);
source_image=source->wand->images;
x;
register Quantum
- *restrict pixels;
+ *magick_restrict pixels;
if (status == MagickFalse)
continue;