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 linePath = stage.path();
4
// starting point
5
linePath.moveTo(200, 100);
6
// Add commands to the path
7
linePath.arcToByEndPoint(300, 100, 250, 50, true, true);
8
linePath.lineTo(250, 50);
9
// make the path a closed shape
10
linePath.close();
11
12
// fill with a pattern fill
13
linePath.fill(stage.hatchFill("backward-diagonal", "#2196F3 0.9", 1));