From c9dbca3091582bcb9f705775e798d58e6360908d Mon Sep 17 00:00:00 2001 From: Cristy Date: Tue, 20 Oct 2015 06:42:22 -0400 Subject: [PATCH] Support maximum and circle for gradient:extent define --- MagickCore/paint.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/MagickCore/paint.c b/MagickCore/paint.c index 1bc408e73..243b955b1 100644 --- a/MagickCore/paint.c +++ b/MagickCore/paint.c @@ -558,6 +558,12 @@ MagickExport MagickBooleanType GradientImage(Image *image, artifact=GetImageArtifact(image,"gradient:extent"); if (artifact != (const char *) NULL) { + if (LocaleCompare(artifact,"Circle") == 0) + { + gradient->radii.x=(double) (MagickMax(image->columns,image->rows))/ + 2.0; + gradient->radii.y=gradient->radii.x; + } if (LocaleCompare(artifact,"Diagonal") == 0) { gradient->radii.x=(double) (sqrt(image->columns*image->columns+ @@ -569,6 +575,12 @@ MagickExport MagickBooleanType GradientImage(Image *image, gradient->radii.x=(double) image->columns/2.0; gradient->radii.y=(double) image->rows/2.0; } + if (LocaleCompare(artifact,"Maximum") == 0) + { + gradient->radii.x=(double) (MagickMax(image->columns,image->rows))/ + 2.0; + gradient->radii.y=gradient->radii.x; + } if (LocaleCompare(artifact,"Mininum") == 0) { gradient->radii.x=(double) (MagickMin(image->columns,image->rows))/ -- 2.40.0