]> granicus.if.org Git - imagemagick/commitdiff
Changed return type of GetFillColor and GetStrokeColor.
authordirk <dirk@git.imagemagick.org>
Mon, 14 Mar 2016 11:42:50 +0000 (12:42 +0100)
committerdirk <dirk@git.imagemagick.org>
Mon, 14 Mar 2016 11:42:50 +0000 (12:42 +0100)
MagickCore/annotate.c
MagickCore/draw-private.h
MagickCore/draw.c
MagickCore/paint.c

index 0d61a6d910e7c7d4e45386e5b35306fee70447e9..75789427675f1e5fec2a09ee2bb499e1e23fac03 100644 (file)
@@ -1635,8 +1635,7 @@ static MagickBooleanType RenderFreetype(Image *image,const DrawInfo *draw_info,
             if (q == (Quantum *) NULL)
               continue;
             GetPixelInfo(image,&fill_color);
-            (void) GetFillColor(draw_info,x_offset,y_offset,&fill_color,
-              exception);
+            GetFillColor(draw_info,x_offset,y_offset,&fill_color,exception);
             fill_opacity=fill_opacity*fill_color.alpha;
             CompositePixelOver(image,&fill_color,fill_opacity,q,
               GetPixelAlpha(image,q),q);
@@ -2015,7 +2014,7 @@ static MagickBooleanType RenderPostscript(Image *image,
           break;
         for (x=0; x < (ssize_t) annotate_image->columns; x++)
         {
-          (void) GetFillColor(draw_info,x,y,&fill_color,exception);
+          GetFillColor(draw_info,x,y,&fill_color,exception);
           SetPixelAlpha(annotate_image,ClampToQuantum((((double) QuantumScale*
             GetPixelIntensity(annotate_image,q)*fill_color.alpha))),q);
           SetPixelRed(annotate_image,fill_color.red,q);
index 665bdc946a7aa7d57d0b3f09fea4b83bfec46b8d..b3d87a03b7df8256aba7d711f1eb40c5d7d5a172 100644 (file)
 extern "C" {
 #endif
 
-static inline MagickBooleanType GetFillColor(const DrawInfo *draw_info,
-  const ssize_t x,const ssize_t y,PixelInfo *fill,ExceptionInfo *exception)
+static inline void GetFillColor(const DrawInfo *draw_info,const ssize_t x,
+  const ssize_t y,PixelInfo *fill,ExceptionInfo *exception)
 {
   if (draw_info->fill_pattern == (Image *) NULL)
     {
       *fill=draw_info->fill;
-      return(MagickTrue);
+      return;
     }
   {
     Image
       *pattern;
 
-    MagickBooleanType
-      status;
-
     pattern=draw_info->fill_pattern;
-    status=GetOneVirtualPixelInfo(pattern,TileVirtualPixelMethod,x+
+    (void) GetOneVirtualPixelInfo(pattern,TileVirtualPixelMethod,x+
       pattern->tile_offset.x,y+pattern->tile_offset.y,fill,exception);
-    return(status);
   }
 }
 
-static inline MagickBooleanType GetStrokeColor(const DrawInfo *draw_info,
-  const ssize_t x,const ssize_t y,PixelInfo *stroke,ExceptionInfo *exception)
+static inline void GetStrokeColor(const DrawInfo *draw_info,const ssize_t x,
+  const ssize_t y,PixelInfo *stroke,ExceptionInfo *exception)
 {
   if (draw_info->stroke_pattern == (Image *) NULL)
     {
       *stroke=draw_info->stroke;
-      return(MagickTrue);
+      return;
     }
   {
     Image
       *pattern;
 
-    MagickBooleanType
-      status;
-
     pattern=draw_info->stroke_pattern;
-    status=GetOneVirtualPixelInfo(pattern,TileVirtualPixelMethod,x+
+    (void) GetOneVirtualPixelInfo(pattern,TileVirtualPixelMethod,x+
       pattern->tile_offset.x,y+pattern->tile_offset.y,stroke,exception);
-    return(status);
   }
 }
 
index 1dd1a3c205d72106973e1bafed90ec1da55548dc..f62e851bdda679cd8fb0eb63ae8faca2fa181842 100644 (file)
@@ -3977,7 +3977,7 @@ RestoreMSCWarning
           if ((x == (ssize_t) ceil(primitive_info->point.x-0.5)) &&
               (y == (ssize_t) ceil(primitive_info->point.y-0.5)))
             {
-              (void) GetFillColor(draw_info,x-start_x,y-start_y,&pixel,exception);
+              GetFillColor(draw_info,x-start_x,y-start_y,&pixel,exception);
               SetPixelViaPixelInfo(image,&pixel,q);
             }
           q+=GetPixelChannels(image);
@@ -4050,11 +4050,11 @@ RestoreMSCWarning
           fill_alpha=fill_alpha > 0.25 ? 1.0 : 0.0;
           stroke_alpha=stroke_alpha > 0.25 ? 1.0 : 0.0;
         }
-      (void) GetFillColor(draw_info,x-start_x,y-start_y,&fill_color,exception);
+      GetFillColor(draw_info,x-start_x,y-start_y,&fill_color,exception);
       fill_alpha=fill_alpha*fill_color.alpha;
       CompositePixelOver(image,&fill_color,fill_alpha,q,(double)
         GetPixelAlpha(image,q),q);
-      (void) GetStrokeColor(draw_info,x-start_x,y-start_y,&stroke_color,exception);
+      GetStrokeColor(draw_info,x-start_x,y-start_y,&stroke_color,exception);
       stroke_alpha=stroke_alpha*stroke_color.alpha;
       CompositePixelOver(image,&stroke_color,stroke_alpha,q,(double)
         GetPixelAlpha(image,q),q);
@@ -4256,7 +4256,7 @@ MagickExport MagickBooleanType DrawPrimitive(Image *image,
           q=GetCacheViewAuthenticPixels(image_view,x,y,1,1,exception);
           if (q == (Quantum *) NULL)
             break;
-          (void) GetFillColor(draw_info,x,y,&pixel,exception);
+          GetFillColor(draw_info,x,y,&pixel,exception);
           SetPixelAlpha(image,ClampToQuantum(pixel.alpha),q);
           (void) SyncCacheViewAuthenticPixels(image_view,exception);
           break;
@@ -4290,7 +4290,7 @@ MagickExport MagickBooleanType DrawPrimitive(Image *image,
                   q+=GetPixelChannels(image);
                   continue;
                 }
-              (void) GetFillColor(draw_info,x,y,&pixel,exception);
+              GetFillColor(draw_info,x,y,&pixel,exception);
               SetPixelAlpha(image,ClampToQuantum(pixel.alpha),q);
               q+=GetPixelChannels(image);
             }
@@ -4343,7 +4343,7 @@ MagickExport MagickBooleanType DrawPrimitive(Image *image,
               break;
             for (x=0; x < (ssize_t) image->columns; x++)
             {
-              (void) GetFillColor(draw_info,x,y,&pixel,exception);
+              GetFillColor(draw_info,x,y,&pixel,exception);
               SetPixelAlpha(image,ClampToQuantum(pixel.alpha),q);
               q+=GetPixelChannels(image);
             }
@@ -4373,7 +4373,7 @@ MagickExport MagickBooleanType DrawPrimitive(Image *image,
           if (q == (Quantum *) NULL)
             break;
           GetPixelInfo(image,&pixel);
-          (void) GetFillColor(draw_info,x,y,&pixel,exception);
+          GetFillColor(draw_info,x,y,&pixel,exception);
           SetPixelViaPixelInfo(image,&pixel,q);
           (void) SyncCacheViewAuthenticPixels(image_view,exception);
           break;
@@ -4406,7 +4406,7 @@ MagickExport MagickBooleanType DrawPrimitive(Image *image,
                   q+=GetPixelChannels(image);
                   continue;
                 }
-              (void) GetFillColor(draw_info,x,y,&pixel,exception);
+              GetFillColor(draw_info,x,y,&pixel,exception);
               SetPixelViaPixelInfo(image,&pixel,q);
               q+=GetPixelChannels(image);
             }
@@ -4455,7 +4455,7 @@ MagickExport MagickBooleanType DrawPrimitive(Image *image,
               break;
             for (x=0; x < (ssize_t) image->columns; x++)
             {
-              (void) GetFillColor(draw_info,x,y,&pixel,exception);
+              GetFillColor(draw_info,x,y,&pixel,exception);
               SetPixelViaPixelInfo(image,&pixel,q);
               q+=GetPixelChannels(image);
             }
@@ -4560,7 +4560,7 @@ MagickExport MagickBooleanType DrawPrimitive(Image *image,
       q=GetCacheViewAuthenticPixels(image_view,x,y,1,1,exception);
       if (q == (Quantum *) NULL)
         break;
-      (void) GetFillColor(draw_info,x,y,&fill_color,exception);
+      GetFillColor(draw_info,x,y,&fill_color,exception);
       CompositePixelOver(image,&fill_color,(double) fill_color.alpha,q,
         (double) GetPixelAlpha(image,q),q);
       (void) SyncCacheViewAuthenticPixels(image_view,exception);
index 7e6dea8e73f91b3f05f21aa2f93943e097fd135a..d0cf78870661dfc2c8ccfe2983f5207eb3b2f49a 100644 (file)
@@ -351,7 +351,7 @@ MagickExport MagickBooleanType FloodfillPaintImage(Image *image,
     {
       if (GetPixelGray(floodplane_image,p) != 0)
         {
-          (void) GetFillColor(draw_info,x,y,&fill_color,exception);
+          GetFillColor(draw_info,x,y,&fill_color,exception);
           SetPixelViaPixelInfo(image,&fill_color,q);
         }
       p+=GetPixelChannels(floodplane_image);