Definition at line 560 of file lwout_svg.c.
References getPoint2d_cp(), POINTARRAY::npoints, OUT_MAX_DIGS_DOUBLE, OUT_MAX_DOUBLE, OUT_MAX_DOUBLE_PRECISION, trim_trailing_zeros(), pixval::x, POINT2D::x, pixval::y, and POINT2D::y.
Referenced by assvg_line_buf(), and assvg_polygon_buf().
569 double dx, dy,
x,
y, accum_x, accum_y;
578 if (close_ring) end = pa->
npoints;
584 x = round(pt->
x*f)/f;
585 y = round(pt->
y*f)/f;
590 sprintf(sx,
"%g", x);
594 sprintf(sy,
"%.*f",
precision, fabs(y) ? y * -1 : y);
596 sprintf(sy,
"%g", fabs(y) ? y * -1 : y);
599 ptr += sprintf(ptr,
"%s %s l", sx, sy);
606 for (i=1 ; i < end ; i++)
612 x = round(pt->
x*f)/f;
613 y = round(pt->
y*f)/f;
620 sprintf(sx,
"%g", dx);
626 fabs(dy) ? dy * -1: dy);
629 fabs(dy) ? dy * -1: dy);
635 ptr += sprintf(ptr,
" %s %s", sx, sy);
#define OUT_MAX_DOUBLE_PRECISION
void trim_trailing_zeros(char *num)
const POINT2D * getPoint2d_cp(const POINTARRAY *pa, int n)
Returns a POINT2D pointer into the POINTARRAY serialized_ptlist, suitable for reading from...
#define OUT_MAX_DIGS_DOUBLE