SVG
Open a drawing with svgInit(), pass the handle to the drawing routines and finish with svgClose(). The output width and height are in pixels. The optional nViewSize sets a separate square coordinate system. For example, use 24 drawing units on each axis for an icon written as 512 × 512 pixels.
Each drawing starts with a black pen one unit wide and flat ends. Use svgPen() to set the width, color and round ends and joins for subsequent outlines and lines. An outline is centered on the shape boundary. Filled shapes and text take their own color. In inline SVG on a web page, "currentColor" uses the inherited CSS text color.
Draw lines, rectangles, circles, ellipses and polygons. Rectangles and polygons accept a corner radius. Arcs and circular sectors use degrees, with 0 pointing right and 90 pointing down. Use svgPath() or svgFilledPath() to draw from SVG path commands for lines, arcs and curves. Text is UTF-8 and XML-escaped. Include svg.ch for the font-weight and alignment constants.
The library is available on Windows and Linux and has no additional library dependencies. Run make in the xDev source tree to build libxsvg.a and make install to install it. xDev links the libraries in lib/xdev automatically.
D
S
svgArc()
Draw an arc of a circle
svgCircle()
Draw the outline of a circle
svgClose()
Finish an SVG drawing and close its file
svgComment()
Write an XML comment to an SVG file
svgEllipse()
Draw the outline of an ellipse
svgFilledCircle()
Draw a filled circle
svgFilledEllipse()
Draw a filled ellipse
svgFilledPath()
Draw a filled shape from SVG path data
svgFilledPie()
Draw a filled circular sector
svgFilledPolygon()
Draw a filled polygon
svgFilledRect()
Draw a filled rectangle
svgInit()
Create an SVG file and write its header
svgLine()
Draw a straight line segment
svgPath()
Draw an SVG path with the current pen
svgPen()
Set the pen for subsequent outlines and lines
svgPie()
Draw the outline of a circular sector
svgPolygon()
Draw the outline of a closed polygon
svgRect()
Draw the outline of a rectangle
svgText()
Draw UTF-8 text with font and alignment options