PostGIS  3.4.0dev-r@@SVN_REVISION@@

◆ assvg_polygon()

static void assvg_polygon ( stringbuffer_t sb,
const LWPOLY poly,
int  relative,
int  precision 
)
static

Definition at line 309 of file lwout_svg.c.

310 {
311  uint32_t i;
312 
313  for (i = 0; i<poly->nrings; i++)
314  {
315  if (i) stringbuffer_append(sb, " "); /* Space beetween each ring */
316  stringbuffer_append(sb, "M "); /* Start path with SVG MoveTo */
317 
318  if (relative)
319  {
320  pointArray_svg_rel(sb, poly->rings[i], 0, precision, 0);
321  stringbuffer_append(sb, " z"); /* SVG closepath */
322  }
323  else
324  {
325  pointArray_svg_abs(sb, poly->rings[i], 0, precision, 0);
326  stringbuffer_append(sb, " Z"); /* SVG closepath */
327  }
328  }
329 }
static uint8_t precision
Definition: cu_in_twkb.c:25
static void pointArray_svg_rel(stringbuffer_t *sb, const POINTARRAY *pa, int close_ring, int precision, int start_at_index)
Definition: lwout_svg.c:44
static void pointArray_svg_abs(stringbuffer_t *sb, const POINTARRAY *pa, int close_ring, int precision, int start_at_index)
Returns maximum size of rendered pointarray in bytes.
Definition: lwout_svg.c:102
static void stringbuffer_append(stringbuffer_t *s, const char *a)
Append the specified string to the stringbuffer_t.
Definition: stringbuffer.h:105
POINTARRAY ** rings
Definition: liblwgeom.h:519
uint32_t nrings
Definition: liblwgeom.h:524

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

Referenced by assvg_geom(), assvg_multipolygon(), assvg_multisurface(), and lwgeom_to_svg().

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