SVGRect

Part of wslib


see also: SVG, SVGFile


superclass : SVGObject


The SVGRect holds the data for a rectangle


creation


SVGRect ( x, y, width, height, rx, ry, name, strokeColor, fillColor, strokeWidth, transform )

creates a new object with the instance variables as described below and in the SVGObject helpfile



SVGRect.fromRect ( rect, name, strokeColor, fillColor, strokeWidth, transform )

creates a new object by taking x, y, width, height values from a  Rect 


instance variables


x, y, width, height

radius of x and y


rx, ry

radius of the corners for a rounded rect. 


strokeColor, fillColor

colors for stroke and fill. These can be 

a Color

a String or Symbol with a color name ( e.g. "light_blue" or "#0000FF" )

"none" or nil

strokeWidth

defaults to 1.


SVGRect( 10, 10, 300, 200, 0, 0, "my rect", "navajo_white", "royal_blue", 5 ).plot;

SVGRect( 10, 10, 300, 200, 30, 50, "my rect", "navy", "antique_white", 5 ).plot;