Syntax
svgText( nSvg, nX, nY, cText, cFont, nSize, nFontWeight, cColor, [nAlign] ) --> NILArguments
nSvg
Drawing handle returned by svgInit().
nX
Horizontal position of the text anchor.
nY
Vertical position of the text baseline.
cText
UTF-8 text to draw.
cFont
Font family name.
nSize
Font size in SVG units.
nFontWeight
Numeric font weight, for example FONT_WEIGHT_BOLD from svg.ch.
cColor
SVG text color.
nAlign
SVG_ALIGN_LEFT (default), SVG_ALIGN_CENTER or SVG_ALIGN_RIGHT from svg.ch.
Return value
NIL.
Description
Writes an SVG text element. The text and font family are XML-escaped. Horizontal alignment determines where the text is placed relative to nX.
Header
svg.ch
Example
#include "svg.ch"
PROCEDURE Main()
LOCAL nSvg := svgInit( "text.svg", 400, 120 )
IF nSvg == 0
RETURN
ENDIF
svgText( nSvg, 200, 70, "xDev SVG", "sans-serif", 32, ;
FONT_WEIGHT_BOLD, "#264D73", SVG_ALIGN_CENTER )
svgClose( nSvg )
RETURNOutput