]> granicus.if.org Git - imagemagick/commitdiff
(no commit message)
authorcristy <urban-warrior@git.imagemagick.org>
Wed, 5 Sep 2012 00:14:14 +0000 (00:14 +0000)
committercristy <urban-warrior@git.imagemagick.org>
Wed, 5 Sep 2012 00:14:14 +0000 (00:14 +0000)
MagickCore/draw.c

index a708161820b8ec6cfb0f56b29e1a4ecfddabcbe0..3fa9c7675368cc68c7e31bf535f7fd590ab52e9f 100644 (file)
@@ -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));