HTMLcopy
1
<div id="container"></div>
CSScopy
6
1
html, body, #container {
2
width: 100%;
3
height: 100%;
4
margin: 0;
5
padding: 0;
6
}
JavaScriptcopy
x
1
var stage = acgraph.create('container');
2
3
var rectangle;
4
5
rectangle = new acgraph.math.Rect(10, 20, 55, 55);
6
7
// Draws a rectangle with truncated corners.
8
acgraph.vector.primitives.truncatedRect(stage, rectangle, 12);
9
10
rectangle = new acgraph.math.Rect(100, 50, 75, 95);
11
12
// Draws a rectangle with truncated corners.
13
acgraph.vector.primitives.truncatedRect(stage, rectangle, 10, 20, 5);
14
15
rectangle = new acgraph.math.Rect(210, 20, 75, 55);
16
17
// Draws a rectangle with truncated corners.
18
acgraph.vector.primitives.truncatedRect(stage, rectangle, 10, 25, 5, 16);