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

◆ assvg_polygon_buf()

static size_t assvg_polygon_buf ( const LWPOLY poly,
char *  output,
int  relative,
int  precision 
)
static

Definition at line 213 of file lwout_svg.c.

214{
215 uint32_t i;
216 char *ptr=output;
217
218 for (i=0; i<poly->nrings; i++)
219 {
220 if (i) ptr += sprintf(ptr, " "); /* Space beetween each ring */
221 ptr += sprintf(ptr, "M "); /* Start path with SVG MoveTo */
222
223 if (relative)
224 {
225 ptr += pointArray_svg_rel(poly->rings[i], ptr, 0, precision);
226 ptr += sprintf(ptr, " z"); /* SVG closepath */
227 }
228 else
229 {
230 ptr += pointArray_svg_abs(poly->rings[i], ptr, 0, precision);
231 ptr += sprintf(ptr, " Z"); /* SVG closepath */
232 }
233 }
234
235 return (ptr-output);
236}
static uint8_t precision
Definition cu_in_twkb.c:25
static size_t pointArray_svg_rel(POINTARRAY *pa, char *output, int close_ring, int precision)
Definition lwout_svg.c:550
static size_t pointArray_svg_abs(POINTARRAY *pa, char *output, int close_ring, int precision)
Returns maximum size of rendered pointarray in bytes.
Definition lwout_svg.c:614
POINTARRAY ** rings
Definition liblwgeom.h:505
uint32_t nrings
Definition liblwgeom.h:510

References LWPOLY::nrings, pointArray_svg_abs(), pointArray_svg_rel(), precision, and LWPOLY::rings.

Referenced by assvg_geom_buf(), assvg_multipolygon_buf(), and assvg_polygon().

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