From: cristy Date: Wed, 5 Sep 2012 00:14:14 +0000 (+0000) Subject: (no commit message) X-Git-Tag: 7.0.1-0~4997 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=7ed6d576f6e7dcf49e71cf1304dc51dad512c1c1;p=imagemagick --- diff --git a/MagickCore/draw.c b/MagickCore/draw.c index a70816182..3fa9c7675 100644 --- a/MagickCore/draw.c +++ b/MagickCore/draw.c @@ -1325,16 +1325,16 @@ static void DrawBoundingRectangles(Image *image,const DrawInfo *draw_info, } bounds.x1-=mid; bounds.x1=bounds.x1 < 0.0 ? 0.0 : bounds.x1 >= (double) - image->columns ? (double) image->columns-1 : bounds.x1; + image->columns ? (double) image->columns : bounds.x1; bounds.y1-=mid; bounds.y1=bounds.y1 < 0.0 ? 0.0 : bounds.y1 >= (double) - image->rows ? (double) image->rows-1 : bounds.y1; + image->rows ? (double) image->rows : bounds.y1; bounds.x2+=mid; bounds.x2=bounds.x2 < 0.0 ? 0.0 : bounds.x2 >= (double) - image->columns ? (double) image->columns-1 : bounds.x2; + image->columns ? (double) image->columns : bounds.x2; bounds.y2+=mid; bounds.y2=bounds.y2 < 0.0 ? 0.0 : bounds.y2 >= (double) - image->rows ? (double) image->rows-1 : bounds.y2; + image->rows ? (double) image->rows : bounds.y2; for (i=0; i < (ssize_t) polygon_info->number_edges; i++) { if (polygon_info->edges[i].direction != 0) @@ -3851,16 +3851,16 @@ static MagickBooleanType DrawPolygonPrimitive(Image *image, } bounds.x1-=(mid+1.0); bounds.x1=bounds.x1 < 0.0 ? 0.0 : (size_t) ceil(bounds.x1-0.5) >= - image->columns ? (double) image->columns-1.0 : bounds.x1; + image->columns ? (double) image->columns : bounds.x1; bounds.y1-=(mid+1.0); bounds.y1=bounds.y1 < 0.0 ? 0.0 : (size_t) ceil(bounds.y1-0.5) >= - image->rows ? (double) image->rows-1.0 : bounds.y1; + image->rows ? (double) image->rows : bounds.y1; bounds.x2+=(mid+1.0); bounds.x2=bounds.x2 < 0.0 ? 0.0 : (size_t) floor(bounds.x2-0.5) >= - image->columns ? (double) image->columns-1.0 : bounds.x2; + image->columns ? (double) image->columns : bounds.x2; bounds.y2+=(mid+1.0); bounds.y2=bounds.y2 < 0.0 ? 0.0 : (size_t) floor(bounds.y2-0.5) >= - image->rows ? (double) image->rows-1.0 : bounds.y2; + image->rows ? (double) image->rows : bounds.y2; status=MagickTrue; image_view=AcquireAuthenticCacheView(image,exception); height=(size_t) (floor(bounds.y2-0.5)-ceil(bounds.y1-0.5));