% July 1992 %
% %
% %
-% Copyright 1999-2011 ImageMagick Studio LLC, a non-profit organization %
+% Copyright 1999-2012 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 %
status=GetMultilineTypeMetrics(image,draw_info,&metrics,exception);
if (status == MagickFalse)
{
- InheritException(exception,&image->exception);
image=DestroyImageList(image);
return((Image *) NULL);
}
image->columns=(size_t) (metrics.width+draw_info->stroke_width+1.5);
if (image->columns == 0)
image->columns=(size_t) (draw_info->pointsize+draw_info->stroke_width+1.5);
- if ((draw_info->gravity == UndefinedGravity) ||
- (draw_info->direction == RightToLeftDirection))
+ if (draw_info->gravity == UndefinedGravity)
{
(void) FormatLocaleString(geometry,MaxTextExtent,"%+g%+g",
-metrics.bounds.x1+draw_info->stroke_width/2.0,metrics.ascent+
draw_info->stroke_width/2.0);
+ (void) CloneString(&draw_info->geometry,geometry);
+ }
+ if (draw_info->direction == RightToLeftDirection)
+ {
if (draw_info->direction == RightToLeftDirection)
(void) FormatLocaleString(geometry,MaxTextExtent,"%+g%+g",
image->columns-(metrics.bounds.x2+draw_info->stroke_width/2.0),
metrics.ascent+draw_info->stroke_width/2.0);
- draw_info->geometry=AcquireString(geometry);
+ (void) CloneString(&draw_info->geometry,geometry);
}
if (image->rows == 0)
image->rows=(size_t) floor(metrics.height+draw_info->stroke_width+0.5);
if (image->rows == 0)
image->rows=(size_t) floor(draw_info->pointsize+draw_info->stroke_width+
0.5);
- if (SetImageBackgroundColor(image) == MagickFalse)
+ if (SetImageBackgroundColor(image,exception) == MagickFalse)
{
- InheritException(exception,&image->exception);
image=DestroyImageList(image);
return((Image *) NULL);
}