(void) status;
width=(size_t) floor(metrics.width+draw_info->stroke_width+0.5);
height=(size_t) floor(metrics.height+draw_info->stroke_width+0.5);
- if ((width > image->columns) && (height > image->rows))
+ if (((image->columns != 0) && (width > image->columns)) ||
+ ((image->rows != 0) && (height > image->rows)))
break;
draw_info->pointsize*=2.0;
}
status=GetMultilineTypeMetrics(image,draw_info,&metrics,exception);
width=(size_t) floor(metrics.width+draw_info->stroke_width+0.5);
height=(size_t) floor(metrics.height+draw_info->stroke_width+0.5);
- if ((width <= image->columns) && (height <= image->rows))
+ if (((image->columns != 0) && (width <= image->columns)) ||
+ ((image->rows != 0) && (height <= image->rows)))
low=draw_info->pointsize+1.0;
else
high=draw_info->pointsize-1.0;
}
- for (draw_info->pointsize=(low+high)/2.0; (high-low) > 1.0; )
+ for (draw_info->pointsize=(low+high)/2.0; ; )
{
(void) FormatLocaleString(geometry,MaxTextExtent,"%+g%+g",
-metrics.bounds.x1,metrics.ascent);
status=GetMultilineTypeMetrics(image,draw_info,&metrics,exception);
width=(size_t) floor(metrics.width+draw_info->stroke_width+0.5);
height=(size_t) floor(metrics.height+draw_info->stroke_width+0.5);
- if ((width <= image->columns) && (height <= image->rows))
+ if (((image->columns != 0) && (width <= image->columns)) ||
+ ((image->rows != 0) && (height <= image->rows)))
break;
draw_info->pointsize--;
}