From d9d2c0db7334721f9ed0c3304226f9fa53298d18 Mon Sep 17 00:00:00 2001 From: Cristy Date: Fri, 25 Dec 2015 08:15:09 -0500 Subject: [PATCH] Rename 'DrawAllocateWand' method to 'AcquireDrawingWand' --- MagickWand/drawing-wand.c | 91 ++++++++++++++++++++------------------- MagickWand/drawing-wand.h | 2 +- coders/wmf.c | 2 +- 3 files changed, 48 insertions(+), 47 deletions(-) diff --git a/MagickWand/drawing-wand.c b/MagickWand/drawing-wand.c index da3b370f3..ca6a1dfdc 100644 --- a/MagickWand/drawing-wand.c +++ b/MagickWand/drawing-wand.c @@ -349,6 +349,52 @@ static void AdjustAffine(DrawingWand *wand,const AffineMatrix *affine) % % % % % % ++ A c q u i r e D r a w i n g W a n d % +% % +% % +% % +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% +% AcquireDrawingWand() allocates an initial drawing wand which is an opaque +% handle required by the remaining drawing methods. +% +% The format of the AcquireDrawingWand method is: +% +% DrawingWand AcquireDrawingWand(const DrawInfo *draw_info,Image *image) +% +% A description of each parameter follows: +% +% o draw_info: Initial drawing defaults. Set to NULL to use defaults. +% +% o image: the image to draw on. +% +*/ +WandExport DrawingWand *AcquireDrawingWand(const DrawInfo *draw_info, + Image *image) +{ + DrawingWand + *wand; + + wand=NewDrawingWand(); + if (draw_info != (const DrawInfo *) NULL) + { + CurrentContext=DestroyDrawInfo(CurrentContext); + CurrentContext=CloneDrawInfo((ImageInfo *) NULL,draw_info); + } + if (image != (Image *) NULL) + { + wand->image=DestroyImage(wand->image); + wand->destroy=MagickFalse; + } + wand->image=image; + return(wand); +} + +/* +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% % +% % +% % % C l e a r D r a w i n g W a n d % % % % % @@ -581,51 +627,6 @@ WandExport void DrawAffine(DrawingWand *wand,const AffineMatrix *affine) % % % % % % -+ D r a w A l l o c a t e W a n d % -% % -% % -% % -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -% -% DrawAllocateWand() allocates an initial drawing wand which is an opaque -% handle required by the remaining drawing methods. -% -% The format of the DrawAllocateWand method is: -% -% DrawingWand DrawAllocateWand(const DrawInfo *draw_info,Image *image) -% -% A description of each parameter follows: -% -% o draw_info: Initial drawing defaults. Set to NULL to use defaults. -% -% o image: the image to draw on. -% -*/ -WandExport DrawingWand *DrawAllocateWand(const DrawInfo *draw_info,Image *image) -{ - DrawingWand - *wand; - - wand=NewDrawingWand(); - if (draw_info != (const DrawInfo *) NULL) - { - CurrentContext=DestroyDrawInfo(CurrentContext); - CurrentContext=CloneDrawInfo((ImageInfo *) NULL,draw_info); - } - if (image != (Image *) NULL) - { - wand->image=DestroyImage(wand->image); - wand->destroy=MagickFalse; - } - wand->image=image; - return(wand); -} - -/* -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -% % -% % -% % % D r a w A l p h a % % % % % diff --git a/MagickWand/drawing-wand.h b/MagickWand/drawing-wand.h index 9bd2c7ef4..7fd8ac617 100644 --- a/MagickWand/drawing-wand.h +++ b/MagickWand/drawing-wand.h @@ -64,9 +64,9 @@ extern WandExport DrawInfo *PeekDrawingWand(const DrawingWand *); extern WandExport DrawingWand + *AcquireDrawingWand(const DrawInfo *,Image *), *CloneDrawingWand(const DrawingWand *), *DestroyDrawingWand(DrawingWand *), - *DrawAllocateWand(const DrawInfo *,Image *), *NewDrawingWand(void); extern WandExport ExceptionInfo diff --git a/coders/wmf.c b/coders/wmf.c index e5f964ae5..77ce331ef 100644 --- a/coders/wmf.c +++ b/coders/wmf.c @@ -797,7 +797,7 @@ static void ipa_device_open(wmfAPI * API) ddata->push_depth = 0; - ddata->draw_wand = DrawAllocateWand(ddata->draw_info,ddata->image); + ddata->draw_wand = AcquireDrawingWand(ddata->draw_info,ddata->image); } /* -- 2.40.0