mirror of
https://github.com/ImageMagick/ImageMagick.git
synced 2026-05-31 11:18:42 +02:00
cosmetic
This commit is contained in:
+11
-10
@@ -91,19 +91,20 @@
|
||||
% o exception: return any errors or warnings in this structure.
|
||||
%
|
||||
*/
|
||||
|
||||
static inline void AdjustTypeMetricBounds(TypeMetric *metrics)
|
||||
{
|
||||
if (metrics->bounds.x1 < 0.0)
|
||||
{
|
||||
double
|
||||
new_x1;
|
||||
double
|
||||
x1;
|
||||
|
||||
new_x1=ceil(-metrics->bounds.x1+0.5);
|
||||
metrics->width+=new_x1+new_x1;
|
||||
metrics->bounds.x1=new_x1;
|
||||
if (metrics->bounds.x1 >= 0.0)
|
||||
{
|
||||
metrics->bounds.x1=0.0;
|
||||
return;
|
||||
}
|
||||
else
|
||||
metrics->bounds.x1=0.0;
|
||||
x1=ceil(-metrics->bounds.x1+0.5);
|
||||
metrics->width+=x1+x1;
|
||||
metrics->bounds.x1=x1;
|
||||
}
|
||||
|
||||
static Image *ReadCAPTIONImage(const ImageInfo *image_info,
|
||||
@@ -325,7 +326,7 @@ static Image *ReadCAPTIONImage(const ImageInfo *image_info,
|
||||
Draw caption.
|
||||
*/
|
||||
i=FormatMagickCaption(image,draw_info,split,&metrics,&caption,exception);
|
||||
AdjustTypeMetricBounds(&metrics);
|
||||
AdjustTypeMetricBounds(&metrics);
|
||||
(void) CloneString(&draw_info->text,caption);
|
||||
caption=DestroyString(caption);
|
||||
(void) FormatLocaleString(geometry,MagickPathExtent,"%+g%+g",
|
||||
|
||||
+12
-11
@@ -87,19 +87,20 @@
|
||||
% o exception: return any errors or warnings in this structure.
|
||||
%
|
||||
*/
|
||||
|
||||
static inline void AdjustTypeMetricBounds(TypeMetric *metrics)
|
||||
{
|
||||
if (metrics->bounds.x1 < 0.0)
|
||||
{
|
||||
double
|
||||
new_x1;
|
||||
double
|
||||
x1;
|
||||
|
||||
new_x1=ceil(-metrics->bounds.x1+0.5);
|
||||
metrics->width+=new_x1+new_x1;
|
||||
metrics->bounds.x1=new_x1;
|
||||
if (metrics->bounds.x1 >= 0.0)
|
||||
{
|
||||
metrics->bounds.x1=0.0;
|
||||
return;
|
||||
}
|
||||
else
|
||||
metrics->bounds.x1=0.0;
|
||||
x1=ceil(-metrics->bounds.x1+0.5);
|
||||
metrics->width+=x1+x1;
|
||||
metrics->bounds.x1=x1;
|
||||
}
|
||||
|
||||
static Image *ReadLABELImage(const ImageInfo *image_info,
|
||||
@@ -279,8 +280,8 @@ static Image *ReadLABELImage(const ImageInfo *image_info,
|
||||
*/
|
||||
(void) FormatLocaleString(geometry,MagickPathExtent,"%+g%+g",
|
||||
(draw_info->direction == RightToLeftDirection ? (double) image->columns-
|
||||
metrics.bounds.x2 : metrics.bounds.x1),(draw_info->gravity == UndefinedGravity ?
|
||||
MagickMax(metrics.ascent,metrics.bounds.y2) : 0.0));
|
||||
metrics.bounds.x2 : metrics.bounds.x1),(draw_info->gravity ==
|
||||
UndefinedGravity ? MagickMax(metrics.ascent,metrics.bounds.y2) : 0.0));
|
||||
(void) CloneString(&draw_info->geometry,geometry);
|
||||
status=AnnotateImage(image,draw_info,exception);
|
||||
if (image_info->pointsize == 0.0)
|
||||
|
||||
Reference in New Issue
Block a user