From: Cristy Date: Fri, 10 Jun 2016 12:40:09 +0000 (-0400) Subject: ... X-Git-Tag: 7.0.2-0~3 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=ade0d8ef00e5c98c7a54021a3cd2ab157a860666;p=imagemagick ... --- diff --git a/MagickCore/draw.c b/MagickCore/draw.c index da157f32b..6f174779b 100644 --- a/MagickCore/draw.c +++ b/MagickCore/draw.c @@ -89,6 +89,8 @@ Define declarations. */ #define BezierQuantum 200 +#define DrawEpsilon (1.0e-6) + /* Typedef declarations. @@ -4791,10 +4793,10 @@ static void DrawRoundLinecap(Image *image,const DrawInfo *draw_info, for (i=0; i < 4; i++) linecap[i]=(*primitive_info); linecap[0].coordinates=4; - linecap[1].point.x+=(double) (10.0*MagickEpsilon); - linecap[2].point.x+=(double) (10.0*MagickEpsilon); - linecap[2].point.y+=(double) (10.0*MagickEpsilon); - linecap[3].point.y+=(double) (10.0*MagickEpsilon); + linecap[1].point.x+=DrawEpsilon; + linecap[2].point.x+=DrawEpsilon; + linecap[2].point.y+=DrawEpsilon; + linecap[3].point.y+=DrawEpsilon; linecap[4].primitive=UndefinedPrimitive; (void) DrawPolygonPrimitive(image,draw_info,linecap,exception); } @@ -5924,8 +5926,6 @@ static void TraceSquareLinecap(PrimitiveInfo *primitive_info, static inline double DrawEpsilonReciprocal(const double x) { -#define DrawEpsilon (1.0e-6) - double sign = x < 0.0 ? -1.0 : 1.0; return((sign*x) >= DrawEpsilon ? 1.0/x : sign*(1.0/DrawEpsilon)); } diff --git a/MagickCore/magick-type.h b/MagickCore/magick-type.h index 41938cb41..eff2428c2 100644 --- a/MagickCore/magick-type.h +++ b/MagickCore/magick-type.h @@ -97,7 +97,7 @@ typedef long double Quantum; #else #error "MAGICKCORE_QUANTUM_DEPTH must be one of 8, 16, 32, or 64" #endif -#define MagickEpsilon (1.0e-12) +#define MagickEpsilon (1.0e-15) #define MagickMaximumValue 1.79769313486231570E+308 #define MagickMinimumValue 2.22507385850720140E-308 #define QuantumScale ((double) 1.0/(double) QuantumRange)