rect()

Produces a SVG "rect" element.

Syntax

rect(
   x DECIMAL,
   y DECIMAL,
   width DECIMAL,
   height DECIMAL,
   rx DECIMAL,
   ry DECIMAL )
  RETURNS om.DomNode
  1. x defines the X coordinate of the top/left corner.
  2. y defines the Y coordinate of the top/left corner.
  3. width defines the width of the rectangle.
  4. height defines the height of the rectangle.
  5. rx defines the X radius for rounded corners.
  6. ry defines the Y radius for rounded corners.

Usage

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

Rounded borders are got by setting the rx, ry parameters.

Example

DEFINE n om.DomNode
LET n = fglsvgcanvas.rect(10,10,50,30,1,1)