path()

Produces an SVG "path" element.

Syntax

path(
   d STRING )
  RETURNS om.DomNode
  1. d is the SVG path specification.

Usage

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

The path element draws complex SVG shapes combined from lines, arcs, curves, etc.

For more details about path elements, see SVG specification.

Example

Displaying an image from an URL:

DEFINE n om.DomNode
LET n = fglsvgcanvas.path("M50,50 A30,30 0 0,1 35,20 ...")
CALL n.setAttribute(SVGATT_STYLE, "stroke:#006600; stroke-width:0.4")