PostGIS  3.4.0dev-r@@SVN_REVISION@@
All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Macros Pages

◆ assvg_point()

static void assvg_point ( stringbuffer_t sb,
const LWPOINT point,
int  circle,
int  precision 
)
static

Definition at line 135 of file lwout_svg.c.

136 {
137  char sx[OUT_DOUBLE_BUFFER_SIZE];
138  char sy[OUT_DOUBLE_BUFFER_SIZE];
139  if ( !lwgeom_is_empty((LWGEOM*)point) ){
140  const POINT2D* pt = getPoint2d_cp(point->point, 0);
141  lwprint_double(pt->x, precision, sx);
142  lwprint_double(-(pt->y), precision, sy);
143 
145  circle ? "x=\"%s\" y=\"%s\"" : "cx=\"%s\" cy=\"%s\"",
146  sx, sy);
147  }
148 }
static uint8_t precision
Definition: cu_in_twkb.c:25
#define OUT_DOUBLE_BUFFER_SIZE
int lwprint_double(double d, int maxdd, char *buf)
Definition: lwprint.c:457
static const POINT2D * getPoint2d_cp(const POINTARRAY *pa, uint32_t n)
Returns a POINT2D pointer into the POINTARRAY serialized_ptlist, suitable for reading from.
Definition: lwinline.h:101
static int lwgeom_is_empty(const LWGEOM *geom)
Return true or false depending on whether a geometry is an "empty" geometry (no vertices members)
Definition: lwinline.h:203
int stringbuffer_aprintf(stringbuffer_t *s, const char *fmt,...)
Appends a formatted string to the current string buffer, using the format and argument list provided.
Definition: stringbuffer.c:247
double y
Definition: liblwgeom.h:390
double x
Definition: liblwgeom.h:390

References getPoint2d_cp(), lwgeom_is_empty(), lwprint_double(), OUT_DOUBLE_BUFFER_SIZE, LWPOINT::point, precision, stringbuffer_aprintf(), POINT2D::x, and POINT2D::y.

Referenced by assvg_geom(), assvg_multipoint(), and lwgeom_to_svg().

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