text()

Produces a SVG "text" element.

Syntax

text(
   x DECIMAL,
   y DECIMAL,
   content STRING,
   class STRING )
  RETURNS om.DomNode
  1. x and y define the position of the text.
  2. content is the actual text.
  3. class defines a reference to a CSS style.

Usage

This function creates a "text" SVG DOM element from the parameters.

To specify the text font attributes, define a CSS style in a defs() element with the styleList() function, and reference the text style in the class parameter of this function.

Example

DEFINE n om.DomNode
LET n = fglsvgcanvas.text(10,10,"Hello!","mystyle_1")