<div id="container"></div>
html, body, #container {
width: 100%;
height: 100%;
margin: 0;
padding: 0;
}
var stage = acgraph.create('container');
var rectangle = stage.rect(50, 50, 100, 100);
var simpleCircle = stage.circle(150, 150, 50);
// Sets clipping of the rectangle.
rectangle.clip(simpleCircle.getBounds());