rect()
Produces an SVG "rect"
element.
Syntax
rect(
x DECIMAL,
y DECIMAL,
width DECIMAL,
height DECIMAL,
rx DECIMAL,
ry DECIMAL )
RETURNS om.DomNode
- x defines the X coordinate of the top/left corner.
- y defines the Y coordinate of the top/left corner.
- width defines the width of the rectangle.
- height defines the height of the rectangle.
- rx defines the X radius for rounded corners.
- ry defines the Y radius for rounded corners.
Usage
This function creates a "rect"
SVG DOM element from the parameters.
One can get rounded borders by setting the rx, ry parameters.
Example
DEFINE n om.DomNode
LET n = fglsvgcanvas.rect(10,10,50,30,1,1)