break;
if (fabs(length) < MagickEpsilon)
{
- n++;
+ if (draw_info->dash_pattern[n] != 0.0)
+ n++;
if (fabs(draw_info->dash_pattern[n]) < MagickEpsilon)
n=0;
length=scale*draw_info->dash_pattern[n];
%
*/
+static inline double ConstrainCoordinate(double x)
+{
+ if (x < LONG_MIN)
+ return(LONG_MIN);
+ if (x > LONG_MAX)
+ return(LONG_MAX);
+ return(x);
+}
+
static void LogPrimitiveInfo(const PrimitiveInfo *primitive_info)
{
const char
PointInfo
p,
- q,
- point;
+ point,
+ q;
register ssize_t
i,
status&=SetImageMask(image,CompositePixelMask,draw_info->composite_mask,
exception);
}
- x=(ssize_t) ceil(primitive_info->point.x-0.5);
- y=(ssize_t) ceil(primitive_info->point.y-0.5);
+ x=(ssize_t) ceil(ConstrainCoordinate(primitive_info->point.x-0.5));
+ y=(ssize_t) ceil(ConstrainCoordinate(primitive_info->point.y-0.5));
image_view=AcquireAuthenticCacheView(image,exception);
switch (primitive_info->primitive)
{