line()

Produces an SVG "line" element.

Syntax

line(
   x1 DECIMAL,
   y1 DECIMAL,
   x2 DECIMAL,
   y2 DECIMAL )
  RETURNS om.DomNode
  1. x1 defines the X coordinate of the start point.
  2. y1 defines the Y coordinate of the start point.
  3. x2 defines the X coordinate of the end point.
  4. y2 defines the Y coordinate of the end point.

Usage

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

Example

DEFINE n om.DomNode
LET n = fglsvgcanvas.line(10,10,50,30)
CALL n.setAttribute(SVGATT_STYLE,"stroke:#006600;")