status=NegateImage(clip_mask,MagickFalse,exception);
(void) SetImageMask(image,clip_mask,exception);
clip_mask=DestroyImage(clip_mask);
- status=DrawImage(image,clone_info,exception);
+ status&=DrawImage(image,clone_info,exception);
clone_info=DestroyDrawInfo(clone_info);
if (image->debug != MagickFalse)
(void) LogMagickEvent(DrawEvent,GetMagickModule(),"end clip-path");
j++;
dash_polygon[0].coordinates=(size_t) j;
dash_polygon[j].primitive=UndefinedPrimitive;
- status|=DrawStrokePolygon(image,clone_info,dash_polygon,exception);
+ status&=DrawStrokePolygon(image,clone_info,dash_polygon,exception);
}
n++;
if (draw_info->dash_pattern[n] == 0.0)
j++;
dash_polygon[0].coordinates=(size_t) j;
dash_polygon[j].primitive=UndefinedPrimitive;
- status|=DrawStrokePolygon(image,clone_info,dash_polygon,exception);
+ status&=DrawStrokePolygon(image,clone_info,dash_polygon,exception);
}
dash_polygon=(PrimitiveInfo *) RelinquishMagickMemory(dash_polygon);
clone_info=DestroyDrawInfo(clone_info);
**graphic_context;
MagickBooleanType
- proceed,
+ proceed;
+
+ MagickStatusType
status;
double
&graphic_context[n]->fill_pattern,exception);
else
{
- status=QueryColorCompliance(token,AllCompliance,
+ status&=QueryColorCompliance(token,AllCompliance,
&graphic_context[n]->fill,exception);
if (status == MagickFalse)
{
&graphic_context[n]->stroke_pattern,exception);
else
{
- status=QueryColorCompliance(token,AllCompliance,
+ status&=QueryColorCompliance(token,AllCompliance,
&graphic_context[n]->stroke,exception);
if (status == MagickFalse)
{
if ((n != 0) && (graphic_context[n]->clip_mask != (char *) NULL) &&
(LocaleCompare(graphic_context[n]->clip_mask,
graphic_context[n-1]->clip_mask) != 0))
- (void) DrawClipPath(image,graphic_context[n],
+ status&=DrawClipPath(image,graphic_context[n],
graphic_context[n]->clip_mask,exception);
- (void) DrawPrimitive(image,graphic_context[n],primitive_info,exception);
+ status&=DrawPrimitive(image,graphic_context[n],primitive_info,
+ exception);
}
if (primitive_info->text != (char *) NULL)
primitive_info->text=(char *) RelinquishMagickMemory(
primitive_extent);
if (proceed == MagickFalse)
break;
+ if (status == 0)
+ break;
}
if (image->debug != MagickFalse)
(void) LogMagickEvent(DrawEvent,GetMagickModule(),"end draw-image");
if (status == MagickFalse)
ThrowBinaryException(DrawError,"NonconformingDrawingPrimitiveDefinition",
keyword);
- return(status);
+ return(status != 0 ? MagickTrue : MagickFalse);
}
\f
/*
target.green=(double) draw_info->border_color.green;
target.blue=(double) draw_info->border_color.blue;
}
- (void) FloodfillPaintImage(image,draw_info,&target,x,y,
+ status&=FloodfillPaintImage(image,draw_info,&target,x,y,
primitive_info->method == FloodfillMethod ? MagickFalse :
MagickTrue,exception);
break;
target.blue=(double) draw_info->border_color.blue;
}
channel_mask=SetImageChannelMask(image,AlphaChannel);
- (void) FloodfillPaintImage(image,draw_info,&target,x,y,
+ status&=FloodfillPaintImage(image,draw_info,&target,x,y,
primitive_info->method == FloodfillMethod ? MagickFalse :
MagickTrue,exception);
(void) SetImageChannelMask(image,channel_mask);
(void) FormatLocaleString(geometry,MaxTextExtent,"%+f%+f",
primitive_info->point.x,primitive_info->point.y);
(void) CloneString(&clone_info->geometry,geometry);
- status=AnnotateImage(image,clone_info,exception);
+ status&=AnnotateImage(image,clone_info,exception);
clone_info=DestroyDrawInfo(clone_info);
break;
}
clone_info=CloneDrawInfo((ImageInfo *) NULL,draw_info);
clone_info->stroke_width=0.0;
clone_info->stroke.alpha=(Quantum) TransparentAlpha;
- status=DrawPolygonPrimitive(image,clone_info,primitive_info,
+ status&=DrawPolygonPrimitive(image,clone_info,primitive_info,
exception);
clone_info=DestroyDrawInfo(clone_info);
(void) DrawDashPolygon(draw_info,primitive_info,image,exception);
clone_info=CloneDrawInfo((ImageInfo *) NULL,draw_info);
clone_info->stroke_width=0.0;
clone_info->stroke.alpha=(Quantum) TransparentAlpha;
- status=DrawPolygonPrimitive(image,clone_info,primitive_info,
+ status&=DrawPolygonPrimitive(image,clone_info,primitive_info,
exception);
clone_info=DestroyDrawInfo(clone_info);
- status|=DrawStrokePolygon(image,draw_info,primitive_info,exception);
+ status&=DrawStrokePolygon(image,draw_info,primitive_info,exception);
break;
}
- status=DrawPolygonPrimitive(image,draw_info,primitive_info,exception);
+ status&=DrawPolygonPrimitive(image,draw_info,primitive_info,exception);
break;
}
}
*clone_info;
MagickBooleanType
- closed_path,
+ closed_path;
+
+ MagickStatusType
status;
PrimitiveInfo
for (p=primitive_info; p->primitive != UndefinedPrimitive; p+=p->coordinates)
{
stroke_polygon=TraceStrokePolygon(draw_info,p);
- status=DrawPolygonPrimitive(image,clone_info,stroke_polygon,exception);
+ status&=DrawPolygonPrimitive(image,clone_info,stroke_polygon,exception);
+ if (status == 0)
+ break;
stroke_polygon=(PrimitiveInfo *) RelinquishMagickMemory(stroke_polygon);
q=p+p->coordinates-1;
closed_path=(q->point.x == p->point.x) && (q->point.y == p->point.y) ?
if (image->debug != MagickFalse)
(void) LogMagickEvent(DrawEvent,GetMagickModule(),
" end draw-stroke-polygon");
- return(status);
+ return(status != 0 ? MagickTrue : MagickFalse);
}
\f
/*