From 77306a4d1789d3e73a585f8cfa8e84462e654c39 Mon Sep 17 00:00:00 2001 From: Cristy Date: Sun, 2 Oct 2016 10:39:12 -0400 Subject: [PATCH] https://www.imagemagick.org/discourse-server/viewtopic.php?f=3&t=30570 --- MagickCore/paint.c | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/MagickCore/paint.c b/MagickCore/paint.c index d0cf78870..1a1125a37 100644 --- a/MagickCore/paint.c +++ b/MagickCore/paint.c @@ -438,8 +438,8 @@ MagickExport MagickBooleanType GradientImage(Image *image, artifact=GetImageArtifact(image,"gradient:bounding-box"); if (artifact != (const char *) NULL) (void) ParseAbsoluteGeometry(artifact,&gradient->bounding_box); - gradient->gradient_vector.x2=(double) image->columns-1.0; - gradient->gradient_vector.y2=(double) image->rows-1.0; + gradient->gradient_vector.x2=(double) image->columns; + gradient->gradient_vector.y2=(double) image->rows; artifact=GetImageArtifact(image,"gradient:direction"); if (artifact != (const char *) NULL) { @@ -452,8 +452,8 @@ MagickExport MagickBooleanType GradientImage(Image *image, { case NorthWestGravity: { - gradient->gradient_vector.x1=(double) image->columns-1.0; - gradient->gradient_vector.y1=(double) image->rows-1.0; + gradient->gradient_vector.x1=(double) image->columns; + gradient->gradient_vector.y1=(double) image->rows; gradient->gradient_vector.x2=0.0; gradient->gradient_vector.y2=0.0; break; @@ -461,7 +461,7 @@ MagickExport MagickBooleanType GradientImage(Image *image, case NorthGravity: { gradient->gradient_vector.x1=0.0; - gradient->gradient_vector.y1=(double) image->rows-1.0; + gradient->gradient_vector.y1=(double) image->rows; gradient->gradient_vector.x2=0.0; gradient->gradient_vector.y2=0.0; break; @@ -469,14 +469,14 @@ MagickExport MagickBooleanType GradientImage(Image *image, case NorthEastGravity: { gradient->gradient_vector.x1=0.0; - gradient->gradient_vector.y1=(double) image->rows-1.0; - gradient->gradient_vector.x2=(double) image->columns-1.0; + gradient->gradient_vector.y1=(double) image->rows; + gradient->gradient_vector.x2=(double) image->columns; gradient->gradient_vector.y2=0.0; break; } case WestGravity: { - gradient->gradient_vector.x1=(double) image->columns-1.0; + gradient->gradient_vector.x1=(double) image->columns; gradient->gradient_vector.y1=0.0; gradient->gradient_vector.x2=0.0; gradient->gradient_vector.y2=0.0; @@ -486,16 +486,16 @@ MagickExport MagickBooleanType GradientImage(Image *image, { gradient->gradient_vector.x1=0.0; gradient->gradient_vector.y1=0.0; - gradient->gradient_vector.x2=(double) image->columns-1.0; + gradient->gradient_vector.x2=(double) image->columns; gradient->gradient_vector.y2=0.0; break; } case SouthWestGravity: { - gradient->gradient_vector.x1=(double) image->columns-1.0; + gradient->gradient_vector.x1=(double) image->columns; gradient->gradient_vector.y1=0.0; gradient->gradient_vector.x2=0.0; - gradient->gradient_vector.y2=(double) image->rows-1.0; + gradient->gradient_vector.y2=(double) image->rows; break; } case SouthGravity: @@ -503,15 +503,15 @@ MagickExport MagickBooleanType GradientImage(Image *image, gradient->gradient_vector.x1=0.0; gradient->gradient_vector.y1=0.0; gradient->gradient_vector.x2=0.0; - gradient->gradient_vector.y2=(double) image->columns-1.0; + gradient->gradient_vector.y2=(double) image->columns; break; } case SouthEastGravity: { gradient->gradient_vector.x1=0.0; gradient->gradient_vector.y1=0.0; - gradient->gradient_vector.x2=(double) image->columns-1.0; - gradient->gradient_vector.y2=(double) image->rows-1.0; + gradient->gradient_vector.x2=(double) image->columns; + gradient->gradient_vector.y2=(double) image->rows; break; } default: -- 2.40.0