Shapes are sets of connected lines.
Rectangle, Ellipse & Bezier are all represented by this class.
In fact, the Bezier/Rectangle/Ellipse constructors simply call
a shape constructor and plots the appropriate points.
Additionally, this class can be used alone to generate any shape
you like, most notably polygons.
For Bezier, every 4 points you plot represent one segment...
1 = origin
2 = origin handle
3 = destination handle
4 = destination
The separation between segment a's destination and segment b's origin adds a little more
flexibility than Photoshop where they are forced to the same value.
Shape( )
» Shape with no points, plot some
Rectangle( left:number, top:number, right:number, bottom:number )
» Pre-builds Rectangle shape at specified coordinates
Ellipse( left:number, top:number, right:number, bottom:number )
» Pre-builds Elliptical shape, including circles, whose bounding box is the specified parameters
Bezier( )
» A bezier curve with no points, plot some
fillmode:number
» get and set the fillmode used when drawing ( SEE :
Shape Fillmodes )
plot( x:number, y:number )
» add a point to the shape
offset( dx:number, dy:number )
» offset all coordinates by dx and dy