mirror of
https://github.com/tengge1/ShadowEditor.git
synced 2026-01-25 15:08:11 +00:00
45 lines
1.1 KiB
HTML
45 lines
1.1 KiB
HTML
<!DOCTYPE html>
|
|
|
|
<html lang="zh-cn">
|
|
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<title>06 PolylineTest</title>
|
|
<meta name="viewport" content="width=device-width, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0">
|
|
</head>
|
|
|
|
<body>
|
|
<script src="../dist/ShadowEditor.SVG.js"></script>
|
|
<script>
|
|
var dom = Shadow.SVG.create({
|
|
xtype: 'svg',
|
|
parent: document.body,
|
|
attr: {
|
|
width: 400,
|
|
height: 400,
|
|
viewBox: '0 0 200 100'
|
|
},
|
|
children: [{
|
|
xtype: 'polyline',
|
|
attr: {
|
|
points: '0,100 50,25 50,75 100,0',
|
|
stroke: '#f00',
|
|
'stroke-width': 2,
|
|
fill: '#f00'
|
|
}
|
|
}, {
|
|
xtype: 'polyline',
|
|
attr: {
|
|
points: '100,100 150,25 150,75 200,0',
|
|
stroke: '#f00',
|
|
'stroke-width': 2,
|
|
fill: 'none'
|
|
}
|
|
}]
|
|
});
|
|
|
|
dom.render();
|
|
</script>
|
|
</body>
|
|
|
|
</html> |