ART.Shape is used to draw arbitrary vector shapes from an ART.Path.
ART.Shape implements ART.Transform as a mixin which means it has all transform methods available for moving, scaling and rotating a shape.
ART.Shapes provides shortcuts to common shapes. These inherit from ART.Shape so each shape gets all common ART.Shape methods.
Creates a new shape.
var shape = new ART.Shape([path, width, height]);
The size is optional but should be specified on symbols. It defines the surface on which to draw a path. This can be use to scale the shape to fit a new size using the resizeTo method.
Draws the provided path on the canvas.
shape.draw(path[, width, height]);
Injects a into a ART.Group or ART instance.
This group is rendered in front of any existing content in the container.
shape.inject(container);
var art = new ART(500, 500);
var shape = new ART.Rectangle(400, 200).fill('black').inject(art);
Removes the shape from it’s current container. Leaving it free to be garbage collected or injected somewhere else.
shape.eject();
var art = new ART(500, 500);
var square = new ART.Rectangle(200).fill('black').inject(group);
art.subscribe('click', function(){
square.eject();
});
// TODO: the other methods