From f9d6dc0085244ce46c61d16e4614e43e535da3af Mon Sep 17 00:00:00 2001 From: cristy Date: Thu, 19 Jan 2012 02:14:44 +0000 Subject: [PATCH] --- MagickCore/annotate.c | 3 ++- MagickCore/compare.c | 9 +++------ MagickCore/draw.c | 10 +++++----- MagickCore/montage.c | 2 +- PerlMagick/Magick.xs | 8 ++++---- coders/histogram.c | 5 +++-- coders/svg.c | 26 +++++++++++++------------- coders/wmf.c | 6 ++---- 8 files changed, 33 insertions(+), 36 deletions(-) diff --git a/MagickCore/annotate.c b/MagickCore/annotate.c index e40606a47..3be7d4a04 100644 --- a/MagickCore/annotate.c +++ b/MagickCore/annotate.c @@ -1950,7 +1950,8 @@ static MagickBooleanType RenderX11(Image *image,const DrawInfo *draw_info, image_info=AcquireImageInfo(); client_name=GetClientName(); resource_database=XGetResourceDatabase(display,client_name); - XGetResourceInfo(image_info,resource_database,client_name,&resource_info); + XGetResourceInfo(image_info,resource_database,client_name, + &resource_info); resource_info.close_server=MagickFalse; resource_info.colormap=PrivateColormap; resource_info.font=AcquireString(draw_info->font); diff --git a/MagickCore/compare.c b/MagickCore/compare.c index 477aeb4ce..265c5eeb6 100644 --- a/MagickCore/compare.c +++ b/MagickCore/compare.c @@ -161,14 +161,11 @@ MagickExport Image *CompareImages(Image *image,const Image *reconstruct_image, return((Image *) NULL); } (void) SetImageAlphaChannel(highlight_image,OpaqueAlphaChannel,exception); - (void) QueryColorCompliance("#f1001ecc",AllCompliance,&highlight, - exception); + (void) QueryColorCompliance("#f1001e33",AllCompliance,&highlight,exception); artifact=GetImageArtifact(image,"highlight-color"); if (artifact != (const char *) NULL) - (void) QueryColorCompliance(artifact,AllCompliance,&highlight, - exception); - (void) QueryColorCompliance("#ffffffcc",AllCompliance,&lowlight, - exception); + (void) QueryColorCompliance(artifact,AllCompliance,&highlight,exception); + (void) QueryColorCompliance("#ffffff33",AllCompliance,&lowlight,exception); artifact=GetImageArtifact(image,"lowlight-color"); if (artifact != (const char *) NULL) (void) QueryColorCompliance(artifact,AllCompliance,&lowlight,exception); diff --git a/MagickCore/draw.c b/MagickCore/draw.c index a51202830..a46452239 100644 --- a/MagickCore/draw.c +++ b/MagickCore/draw.c @@ -1270,7 +1270,7 @@ static void DrawBoundingRectangles(Image *image,const DrawInfo *draw_info, coordinates; clone_info=CloneDrawInfo((ImageInfo *) NULL,draw_info); - (void) QueryColorCompliance("#0000",AllCompliance,&clone_info->fill, + (void) QueryColorCompliance("#000F",AllCompliance,&clone_info->fill, exception); resolution.x=DefaultResolution; resolution.y=DefaultResolution; @@ -1420,7 +1420,7 @@ MagickExport MagickBooleanType DrawClipPath(Image *image, (void) SetImageClipMask(image,clip_mask,exception); clip_mask=DestroyImage(clip_mask); } - (void) QueryColorCompliance("#00000000",AllCompliance, + (void) QueryColorCompliance("#000F",AllCompliance, &image->clip_mask->background_color,exception); image->clip_mask->background_color.alpha=(Quantum) TransparentAlpha; (void) SetImageBackgroundColor(image->clip_mask,exception); @@ -3495,7 +3495,7 @@ MagickExport MagickBooleanType DrawPatternPath(Image *image, image_info->size=AcquireString(geometry); *pattern=AcquireImage(image_info,exception); image_info=DestroyImageInfo(image_info); - (void) QueryColorCompliance("#00000000",AllCompliance, + (void) QueryColorCompliance("#000000FF",AllCompliance, &(*pattern)->background_color,exception); (void) SetImageBackgroundColor(*pattern,exception); if (image->debug != MagickFalse) @@ -4748,9 +4748,9 @@ MagickExport void GetDrawInfo(const ImageInfo *image_info,DrawInfo *draw_info) (void) ResetMagickMemory(draw_info,0,sizeof(*draw_info)); GetAffineMatrix(&draw_info->affine); exception=AcquireExceptionInfo(); - (void) QueryColorCompliance("#000F",AllCompliance,&draw_info->fill, + (void) QueryColorCompliance("#0000",AllCompliance,&draw_info->fill, exception); - (void) QueryColorCompliance("#FFF0",AllCompliance,&draw_info->stroke, + (void) QueryColorCompliance("#FFFF",AllCompliance,&draw_info->stroke, exception); draw_info->stroke_width=1.0; draw_info->alpha=OpaqueAlpha; diff --git a/MagickCore/montage.c b/MagickCore/montage.c index 0708cf727..4e5a22e47 100644 --- a/MagickCore/montage.c +++ b/MagickCore/montage.c @@ -818,7 +818,7 @@ MagickExport Image *MontageImageList(const ImageInfo *image_info, /* Shadow image. */ - (void) QueryColorCompliance("#00000000",AllCompliance, + (void) QueryColorCompliance("#000000",AllCompliance, &image->background_color,exception); shadow_image=ShadowImage(image,80.0,2.0,0.0,5,5,exception); if (shadow_image != (Image *) NULL) diff --git a/PerlMagick/Magick.xs b/PerlMagick/Magick.xs index 4dcffd095..7b3dbfc91 100644 --- a/PerlMagick/Magick.xs +++ b/PerlMagick/Magick.xs @@ -10666,10 +10666,10 @@ Mogrify(ref,...) black_point, white_point; - (void) QueryColorCompliance("#000000",AllCompliance, - &black_point,exception); - (void) QueryColorCompliance("#ffffff",AllCompliance, - &white_point,exception); + (void) QueryColorCompliance("#000000",AllCompliance,&black_point, + exception); + (void) QueryColorCompliance("#ffffff",AllCompliance,&white_point, + exception); if (attribute_flag[1] != 0) (void) QueryColorCompliance( argument_list[1].string_reference,AllCompliance,&black_point, diff --git a/coders/histogram.c b/coders/histogram.c index aa88e979d..f3495397d 100644 --- a/coders/histogram.c +++ b/coders/histogram.c @@ -292,12 +292,13 @@ static MagickBooleanType WriteHISTOGRAMImage(const ImageInfo *image_info, /* Initialize histogram image. */ - (void) QueryColorCompliance("#000000",AllCompliance, + (void) QueryColorCompliance("#000",AllCompliance, &histogram_image->background_color,exception); (void) SetImageBackgroundColor(histogram_image,exception); for (x=0; x < (ssize_t) histogram_image->columns; x++) { - q=GetAuthenticPixels(histogram_image,x,0,1,histogram_image->rows,exception); + q=GetAuthenticPixels(histogram_image,x,0,1,histogram_image->rows, + exception); if (q == (Quantum *) NULL) break; if ((GetPixelRedTraits(image) & UpdatePixelTrait) != 0) diff --git a/coders/svg.c b/coders/svg.c index 0c4f87eb6..3e969b6b8 100644 --- a/coders/svg.c +++ b/coders/svg.c @@ -1657,15 +1657,15 @@ static void SVGStartElement(void *context,const xmlChar *name, if (LocaleCompare(value,"currentColor") == 0) { (void) FormatLocaleFile(svg_info->file, - "fill '%s'\n",color); + "fill '%s'\n",color); break; } - if (LocaleCompare(value,"#00000000") == 0) + if (LocaleCompare(value,"#000000FF") == 0) (void) FormatLocaleFile(svg_info->file, - "fill '#000000'\n"); + "fill '#000000'\n"); else (void) FormatLocaleFile(svg_info->file,"fill '%s'\n", - value); + value); break; } if (LocaleCompare(keyword,"fillcolor") == 0) @@ -1747,18 +1747,18 @@ static void SVGStartElement(void *context,const xmlChar *name, } if (LocaleCompare(keyword,"stroke") == 0) { - if (LocaleCompare(value,"currentColor") == 0) - { - (void) FormatLocaleFile(svg_info->file, - "stroke '%s'\n",color); - break; - } - if (LocaleCompare(value,"#00000000") == 0) + if (LocaleCompare(value,"currentColor") == 0) + { + (void) FormatLocaleFile(svg_info->file, + "stroke '%s'\n",color); + break; + } + if (LocaleCompare(value,"#000000FF") == 0) (void) FormatLocaleFile(svg_info->file, - "fill '#000000'\n"); + "fill '#000000'\n"); else (void) FormatLocaleFile(svg_info->file, - "stroke '%s'\n",value); + "stroke '%s'\n",value); break; } if (LocaleCompare(keyword,"stroke-antialiasing") == 0) diff --git a/coders/wmf.c b/coders/wmf.c index 54f9cfcf3..e693defe4 100644 --- a/coders/wmf.c +++ b/coders/wmf.c @@ -890,10 +890,9 @@ static void ipa_device_begin(wmfAPI * API) ddata->pattern_id); (void) DrawSetFillPatternURL(WmfDrawingWand,pattern_id); ++ddata->pattern_id; - DrawRectangle(WmfDrawingWand, - XC(ddata->bbox.TL.x),YC(ddata->bbox.TL.y), - XC(ddata->bbox.BR.x),YC(ddata->bbox.BR.y)); + XC(ddata->bbox.TL.x),YC(ddata->bbox.TL.y), + XC(ddata->bbox.BR.x),YC(ddata->bbox.BR.y)); image=DestroyImageList(image); } else @@ -1941,7 +1940,6 @@ static void util_set_brush(wmfAPI * API, wmfDC * dc, const BrushApply brush_appl (void) FormatLocaleString(pattern_id,MaxTextExtent,"#brush_%lu", ddata->pattern_id); - if ( brush_apply == BrushApplyStroke ) (void) DrawSetStrokePatternURL(WmfDrawingWand,pattern_id); else -- 2.40.0