PostGIS 3.0.6dev-r@@SVN_REVISION@@
Loading...
Searching...
No Matches

◆ pointArray_svg_abs()

static size_t pointArray_svg_abs ( POINTARRAY pa,
char *  output,
int  close_ring,
int  precision 
)
static

Returns maximum size of rendered pointarray in bytes.

Definition at line 614 of file lwout_svg.c.

615{
616 int i, end;
617 char *ptr;
620 POINT2D pt;
621
622 ptr = output;
623
624 if (close_ring) end = pa->npoints;
625 else end = pa->npoints - 1;
626
627 for (i=0 ; i < end ; i++)
628 {
629 getPoint2d_p(pa, i, &pt);
630
633
634 if (i == 1) ptr += sprintf(ptr, " L ");
635 else if (i) ptr += sprintf(ptr, " ");
636 ptr += sprintf(ptr,"%s %s", x, y);
637 }
638
639 return (ptr-output);
640}
static uint8_t precision
Definition cu_in_twkb.c:25
int getPoint2d_p(const POINTARRAY *pa, uint32_t n, POINT2D *point)
Definition lwgeom_api.c:349
#define OUT_DOUBLE_BUFFER_SIZE
int lwprint_double(double d, int maxdd, char *buf, size_t bufsize)
Definition lwprint.c:492
double y
Definition liblwgeom.h:376
double x
Definition liblwgeom.h:376
uint32_t npoints
Definition liblwgeom.h:413

References getPoint2d_p(), lwprint_double(), POINTARRAY::npoints, OUT_DOUBLE_BUFFER_SIZE, precision, POINT2D::x, and POINT2D::y.

Referenced by assvg_line_buf(), and assvg_polygon_buf().

Here is the call graph for this function:
Here is the caller graph for this function: