(void) MvgPrintf(wand,"%s",command);
for (i=number_coordinates, coordinate=coordinates; i != 0; i--)
{
- (void) MvgAutoWrapPrintf(wand," %g %g",coordinate->x,coordinate->y);
+ (void) MvgAutoWrapPrintf(wand," %.20g %.20g",coordinate->x,coordinate->y);
coordinate++;
}
(void) MvgPrintf(wand, "\n");
(void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
assert(affine != (const AffineMatrix *) NULL);
AdjustAffine(wand,affine);
- (void) MvgPrintf(wand,"affine %g %g %g %g %g %g\n",
+ (void) MvgPrintf(wand,"affine %.20g %.20g %.20g %.20g %.20g %.20g\n",
affine->sx,affine->rx,affine->ry,affine->sy,affine->tx,affine->ty);
}
\f
escaped_text=EscapeString((const char *) text,'\'');
if (escaped_text != (char *) NULL)
{
- (void) MvgPrintf(wand,"text %g %g '%s'\n",x,y,escaped_text);
+ (void) MvgPrintf(wand,"text %.20g %.20g '%s'\n",x,y,escaped_text);
escaped_text=DestroyString(escaped_text);
}
}
assert(wand->signature == WandSignature);
if (wand->debug != MagickFalse)
(void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
- (void) MvgPrintf(wand,"arc %g %g %g %g %g %g\n",sx,sy,ex,
+ (void) MvgPrintf(wand,"arc %.20g %.20g %.20g %.20g %.20g %.20g\n",sx,sy,ex,
ey,sd,ed);
}
\f
assert(wand->signature == WandSignature);
if (wand->debug != MagickFalse)
(void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
- (void) MvgPrintf(wand,"circle %g %g %g %g\n",ox,oy,px,py);
+ (void) MvgPrintf(wand,"circle %.20g %.20g %.20g %.20g\n",ox,oy,px,py);
}
\f
/*
}
mode=CommandOptionToMnemonic(MagickComposeOptions,(ssize_t) compose);
media_type=MagickToMime(image->magick);
- (void) MvgPrintf(wand,"image %s %g %g %g %g 'data:%s;base64,\n",
+ (void) MvgPrintf(wand,"image %s %.20g %.20g %.20g %.20g 'data:%s;base64,\n",
mode,x,y,width,height,media_type);
p=base64;
for (i=(ssize_t) encoded_length; i > 0; i-=76)
assert(wand->signature == WandSignature);
if (wand->debug != MagickFalse)
(void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
- (void) MvgPrintf(wand,"color %g %g '%s'\n",x,y,CommandOptionToMnemonic(
+ (void) MvgPrintf(wand,"color %.20g %.20g '%s'\n",x,y,CommandOptionToMnemonic(
MagickMethodOptions,(ssize_t) paint_method));
}
\f
assert(wand->signature == WandSignature);
if (wand->debug != MagickFalse)
(void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
- (void) MvgPrintf(wand,"ellipse %g %g %g %g %g %g\n",ox,oy,
+ (void) MvgPrintf(wand,"ellipse %.20g %.20g %.20g %.20g %.20g %.20g\n",ox,oy,
rx,ry,start,end);
}
\f
size_t *number_elements)
{
double
- *dash_array;
+ *dasharray;
register const double
*p;
while (fabs(*p++) >= MagickEpsilon)
n++;
*number_elements=n;
- dash_array=(double *) NULL;
+ dasharray=(double *) NULL;
if (n != 0)
{
- dash_array=(double *) AcquireQuantumMemory((size_t) n+1UL,
- sizeof(*dash_array));
+ dasharray=(double *) AcquireQuantumMemory((size_t) n+1UL,
+ sizeof(*dasharray));
p=CurrentContext->dash_pattern;
- q=dash_array;
+ q=dasharray;
for (i=0; i < (ssize_t) n; i++)
*q++=(*p++);
*q=0.0;
}
- return(dash_array);
+ return(dasharray);
}
\f
/*
child=AddChildToXMLTree(xml_info,"fill-alpha",0);
if (child != (XMLTreeInfo *) NULL)
{
- (void) FormatLocaleString(value,MaxTextExtent,"%g",
+ (void) FormatLocaleString(value,MaxTextExtent,"%.20g",
(double) QuantumScale*CurrentContext->fill.alpha);
(void) SetXMLTreeContent(child,value);
}
child=AddChildToXMLTree(xml_info,"font-size",0);
if (child != (XMLTreeInfo *) NULL)
{
- (void) FormatLocaleString(value,MaxTextExtent,"%g",
+ (void) FormatLocaleString(value,MaxTextExtent,"%.20g",
CurrentContext->pointsize);
(void) SetXMLTreeContent(child,value);
}
{
if (i != 0)
(void) ConcatenateString(&dash_pattern,",");
- (void) FormatLocaleString(value,MaxTextExtent,"%g",
+ (void) FormatLocaleString(value,MaxTextExtent,"%.20g",
CurrentContext->dash_pattern[i]);
(void) ConcatenateString(&dash_pattern,value);
}
child=AddChildToXMLTree(xml_info,"stroke-dashoffset",0);
if (child != (XMLTreeInfo *) NULL)
{
- (void) FormatLocaleString(value,MaxTextExtent,"%g",
+ (void) FormatLocaleString(value,MaxTextExtent,"%.20g",
CurrentContext->dash_offset);
(void) SetXMLTreeContent(child,value);
}
child=AddChildToXMLTree(xml_info,"stroke-alpha",0);
if (child != (XMLTreeInfo *) NULL)
{
- (void) FormatLocaleString(value,MaxTextExtent,"%g",
+ (void) FormatLocaleString(value,MaxTextExtent,"%.20g",
(double) QuantumScale*CurrentContext->stroke.alpha);
(void) SetXMLTreeContent(child,value);
}
child=AddChildToXMLTree(xml_info,"stroke-width",0);
if (child != (XMLTreeInfo *) NULL)
{
- (void) FormatLocaleString(value,MaxTextExtent,"%g",
+ (void) FormatLocaleString(value,MaxTextExtent,"%.20g",
CurrentContext->stroke_width);
(void) SetXMLTreeContent(child,value);
}
assert(wand->signature == WandSignature);
if (wand->debug != MagickFalse)
(void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
- (void) MvgPrintf(wand,"line %g %g %g %g\n",sx,sy,ex,ey);
+ (void) MvgPrintf(wand,"line %.20g %.20g %.20g %.20g\n",sx,sy,ex,ey);
}
\f
/*
assert(wand->signature == WandSignature);
if (wand->debug != MagickFalse)
(void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
- (void) MvgPrintf(wand,"matte %g %g '%s'\n",x,y,CommandOptionToMnemonic(
+ (void) MvgPrintf(wand,"matte %.20g %.20g '%s'\n",x,y,CommandOptionToMnemonic(
MagickMethodOptions,(ssize_t) paint_method));
}
\f
{
wand->path_operation=PathCurveToOperation;
wand->path_mode=mode;
- (void) MvgAutoWrapPrintf(wand, "%c%g %g %g %g %g %g",
+ (void) MvgAutoWrapPrintf(wand, "%c%.20g %.20g %.20g %.20g %.20g %.20g",
mode == AbsolutePathMode ? 'C' : 'c',x1,y1,x2,y2,x,y);
}
else
- (void) MvgAutoWrapPrintf(wand," %g %g %g %g %g %g",x1,y1,
+ (void) MvgAutoWrapPrintf(wand," %.20g %.20g %.20g %.20g %.20g %.20g",x1,y1,
x2,y2,x,y);
}
{
wand->path_operation=PathCurveToQuadraticBezierOperation;
wand->path_mode=mode;
- (void) MvgAutoWrapPrintf(wand, "%c%g %g %g %g",
+ (void) MvgAutoWrapPrintf(wand, "%c%.20g %.20g %.20g %.20g",
mode == AbsolutePathMode ? 'Q' : 'q',x1,y1,x,y);
}
else
- (void) MvgAutoWrapPrintf(wand," %g %g %g %g",x1,y1,x,y);
+ (void) MvgAutoWrapPrintf(wand," %.20g %.20g %.20g %.20g",x1,y1,x,y);
}
WandExport void DrawPathCurveToQuadraticBezierAbsolute(DrawingWand *wand,
{
wand->path_operation=PathCurveToQuadraticBezierSmoothOperation;
wand->path_mode=mode;
- (void) MvgAutoWrapPrintf(wand,"%c%g %g",mode == AbsolutePathMode ?
+ (void) MvgAutoWrapPrintf(wand,"%c%.20g %.20g",mode == AbsolutePathMode ?
'T' : 't',x,y);
}
else
- (void) MvgAutoWrapPrintf(wand," %g %g",x,y);
+ (void) MvgAutoWrapPrintf(wand," %.20g %.20g",x,y);
}
WandExport void DrawPathCurveToQuadraticBezierSmoothAbsolute(DrawingWand *wand,
{
wand->path_operation=PathCurveToSmoothOperation;
wand->path_mode=mode;
- (void) MvgAutoWrapPrintf(wand,"%c%g %g %g %g",
+ (void) MvgAutoWrapPrintf(wand,"%c%.20g %.20g %.20g %.20g",
mode == AbsolutePathMode ? 'S' : 's',x2,y2,x,y);
}
else
- (void) MvgAutoWrapPrintf(wand," %g %g %g %g",x2,y2,x,y);
+ (void) MvgAutoWrapPrintf(wand," %.20g %.20g %.20g %.20g",x2,y2,x,y);
}
WandExport void DrawPathCurveToSmoothAbsolute(DrawingWand *wand,const double x2,
{
wand->path_operation=PathEllipticArcOperation;
wand->path_mode=mode;
- (void) MvgAutoWrapPrintf(wand, "%c%g %g %g %u %u %g %g",
+ (void) MvgAutoWrapPrintf(wand, "%c%.20g %.20g %.20g %u %u %.20g %.20g",
mode == AbsolutePathMode ? 'A' : 'a',rx,ry,x_axis_rotation,
large_arc_flag,sweep_flag,x,y);
}
else
- (void) MvgAutoWrapPrintf(wand," %g %g %g %u %u %g %g",rx,ry,
+ (void) MvgAutoWrapPrintf(wand," %.20g %.20g %.20g %u %u %.20g %.20g",rx,ry,
x_axis_rotation,large_arc_flag,sweep_flag,x,y);
}
{
wand->path_operation=PathLineToOperation;
wand->path_mode=mode;
- (void) MvgAutoWrapPrintf(wand,"%c%g %g",mode == AbsolutePathMode ?
+ (void) MvgAutoWrapPrintf(wand,"%c%.20g %.20g",mode == AbsolutePathMode ?
'L' : 'l',x,y);
}
else
- (void) MvgAutoWrapPrintf(wand," %g %g",x,y);
+ (void) MvgAutoWrapPrintf(wand," %.20g %.20g",x,y);
}
WandExport void DrawPathLineToAbsolute(DrawingWand *wand,const double x,
{
wand->path_operation=PathLineToHorizontalOperation;
wand->path_mode=mode;
- (void) MvgAutoWrapPrintf(wand,"%c%g",mode == AbsolutePathMode ?
+ (void) MvgAutoWrapPrintf(wand,"%c%.20g",mode == AbsolutePathMode ?
'H' : 'h',x);
}
else
- (void) MvgAutoWrapPrintf(wand," %g",x);
+ (void) MvgAutoWrapPrintf(wand," %.20g",x);
}
WandExport void DrawPathLineToHorizontalAbsolute(DrawingWand *wand,
{
wand->path_operation=PathLineToVerticalOperation;
wand->path_mode=mode;
- (void) MvgAutoWrapPrintf(wand,"%c%g",mode == AbsolutePathMode ?
+ (void) MvgAutoWrapPrintf(wand,"%c%.20g",mode == AbsolutePathMode ?
'V' : 'v',y);
}
else
- (void) MvgAutoWrapPrintf(wand," %g",y);
+ (void) MvgAutoWrapPrintf(wand," %.20g",y);
}
WandExport void DrawPathLineToVerticalAbsolute(DrawingWand *wand,const double y)
{
wand->path_operation=PathMoveToOperation;
wand->path_mode=mode;
- (void) MvgAutoWrapPrintf(wand,"%c%g %g",mode == AbsolutePathMode ?
+ (void) MvgAutoWrapPrintf(wand,"%c%.20g %.20g",mode == AbsolutePathMode ?
'M' : 'm',x,y);
}
else
- (void) MvgAutoWrapPrintf(wand," %g %g",x,y);
+ (void) MvgAutoWrapPrintf(wand," %.20g %.20g",x,y);
}
WandExport void DrawPathMoveToAbsolute(DrawingWand *wand,const double x,
assert(wand->signature == WandSignature);
if (wand->debug != MagickFalse)
(void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
- (void) MvgPrintf(wand,"point %g %g\n",x,y);
+ (void) MvgPrintf(wand,"point %.20g %.20g\n",x,y);
}
\f
/*
return(MagickFalse);
}
wand->filter_off=MagickTrue;
- (void) MvgPrintf(wand,"push pattern %s %g %g %g %g\n",pattern_id,
+ (void) MvgPrintf(wand,"push pattern %s %.20g %.20g %.20g %.20g\n",pattern_id,
x,y,width,height);
wand->indent_depth++;
wand->pattern_id=AcquireString(pattern_id);
assert(wand->signature == WandSignature);
if (wand->debug != MagickFalse)
(void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
- (void) MvgPrintf(wand,"rectangle %g %g %g %g\n",x1,y1,x2,y2);
+ (void) MvgPrintf(wand,"rectangle %.20g %.20g %.20g %.20g\n",x1,y1,x2,y2);
}
\f
/*
assert(wand->signature == WandSignature);
if (wand->debug != MagickFalse)
(void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
- (void) MvgPrintf(wand,"rotate %g\n",degrees);
+ (void) MvgPrintf(wand,"rotate %.20g\n",degrees);
}
\f
/*
assert(wand->signature == WandSignature);
if (wand->debug != MagickFalse)
(void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
- (void) MvgPrintf(wand,"roundrectangle %g %g %g %g %g %g\n",
+ (void) MvgPrintf(wand,"roundrectangle %.20g %.20g %.20g %.20g %.20g %.20g\n",
x1,y1,x2,y2,rx,ry);
}
\f
assert(wand->signature == WandSignature);
if (wand->debug != MagickFalse)
(void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
- (void) MvgPrintf(wand,"scale %g %g\n",x,y);
+ (void) MvgPrintf(wand,"scale %.20g %.20g\n",x,y);
}
\f
/*
(CurrentContext->fill.alpha != alpha))
{
CurrentContext->fill.alpha=alpha;
- (void) MvgPrintf(wand,"fill-alpha %g\n",fill_alpha);
+ (void) MvgPrintf(wand,"fill-alpha %.20g\n",fill_alpha);
}
}
\f
assert(wand->signature == WandSignature);
if (wand->debug != MagickFalse)
(void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
- (void) FormatLocaleString(density,MaxTextExtent,"%gx%g",x_resolution,
+ (void) FormatLocaleString(density,MaxTextExtent,"%.20gx%.20g",x_resolution,
y_resolution);
(void) CloneString(&CurrentContext->density,density);
return(MagickTrue);
(CurrentContext->alpha != quantum_alpha))
{
CurrentContext->alpha=(Quantum) alpha;
- (void) MvgPrintf(wand,"alpha %g\n",alpha);
+ (void) MvgPrintf(wand,"alpha %.20g\n",alpha);
}
}
\f
(fabs(CurrentContext->pointsize-pointsize) >= MagickEpsilon))
{
CurrentContext->pointsize=pointsize;
- (void) MvgPrintf(wand,"font-size %g\n",pointsize);
+ (void) MvgPrintf(wand,"font-size %.20g\n",pointsize);
}
}
\f
% specify the lengths of alternating dashes and gaps in pixels. If an odd
% number of values is provided, then the list of values is repeated to yield
% an even number of values. To remove an existing dash array, pass a zero
-% number_elements argument and null dash_array. A typical stroke dash array
+% number_elements argument and null dasharray. A typical stroke dash array
% might contain the members 5 3 2.
%
% The format of the DrawSetStrokeDashArray method is:
%
% MagickBooleanType DrawSetStrokeDashArray(DrawingWand *wand,
-% const size_t number_elements,const double *dash_array)
+% const size_t number_elements,const double *dasharray)
%
% A description of each parameter follows:
%
%
% o number_elements: number of elements in dash array
%
-% o dash_array: dash array values
+% o dasharray: dash array values
%
*/
WandExport MagickBooleanType DrawSetStrokeDashArray(DrawingWand *wand,
- const size_t number_elements,const double *dash_array)
+ const size_t number_elements,const double *dasharray)
{
MagickBooleanType
update;
update=MagickTrue;
else
if ((CurrentContext->dash_pattern != (double *) NULL) &&
- (dash_array != (double *) NULL))
+ (dasharray != (double *) NULL))
{
- p=dash_array;
+ p=dasharray;
q=CurrentContext->dash_pattern;
for (i=0; i < (ssize_t) n_new; i++)
{
wand->name);
return(MagickFalse);
}
- q=CurrentContext->dash_pattern;
- p=dash_array;
- for (i=0; i < (ssize_t) n_new; i++)
- *q++=(*p++);
- *q=0.0;
+ for (i=0; i < n_new; i++)
+ CurrentContext->dash_pattern[i]=dasharray[i];
+ CurrentContext->dash_pattern[n_new]=0.0;
}
(void) MvgPrintf(wand,"stroke-dasharray ");
if (n_new == 0)
- (void) MvgPrintf(wand,"none");
+ (void) MvgPrintf(wand,"none\n");
else
{
- p=dash_array;
- (void) MvgPrintf(wand,"%g",*p++);
- for (i=1; i < (ssize_t) n_new; i++)
- (void) MvgPrintf(wand,",%g",*p++);
+ for (i=0; i < n_new; i++)
+ {
+ if (i != 0)
+ (void) MvgPrintf(wand,",");
+ (void) MvgPrintf(wand,"%.20g",dasharray[i]);
+ }
+ (void) MvgPrintf(wand,"\n");
}
}
return(MagickTrue);
(fabs(CurrentContext->dash_offset-dash_offset) >= MagickEpsilon))
{
CurrentContext->dash_offset=dash_offset;
- (void) MvgPrintf(wand,"stroke-dashoffset %g\n",dash_offset);
+ (void) MvgPrintf(wand,"stroke-dashoffset %.20g\n",dash_offset);
}
}
\f
(CurrentContext->stroke.alpha != alpha))
{
CurrentContext->stroke.alpha=alpha;
- (void) MvgPrintf(wand,"stroke-alpha %g\n",stroke_alpha);
+ (void) MvgPrintf(wand,"stroke-alpha %.20g\n",stroke_alpha);
}
}
\f
(fabs(CurrentContext->stroke_width-stroke_width) >= MagickEpsilon))
{
CurrentContext->stroke_width=stroke_width;
- (void) MvgPrintf(wand,"stroke-width %g\n",stroke_width);
+ (void) MvgPrintf(wand,"stroke-width %.20g\n",stroke_width);
}
}
\f
assert(wand->signature == WandSignature);
if (wand->debug != MagickFalse)
(void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
- (void) MvgPrintf(wand,"skewX %g\n",degrees);
+ (void) MvgPrintf(wand,"skewX %.20g\n",degrees);
}
\f
/*
assert(wand->signature == WandSignature);
if (wand->debug != MagickFalse)
(void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
- (void) MvgPrintf(wand,"skewY %g\n",degrees);
+ (void) MvgPrintf(wand,"skewY %.20g\n",degrees);
}
\f
/*
assert(wand->signature == WandSignature);
if (wand->debug != MagickFalse)
(void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
- (void) MvgPrintf(wand,"translate %g %g\n",x,y);
+ (void) MvgPrintf(wand,"translate %.20g %.20g\n",x,y);
}
\f
/*