Files
rough/visual-tests/svg/polygon.html
Preet fd621f41c3 Dashed line support (#159)
* stroke line dash for canvas

* canvas fill dashes

* dashed line support in SVG
2020-05-11 00:29:33 -07:00

31 lines
672 B
HTML

<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, minimum-scale=1, initial-scale=1, user-scalable=yes">
<title>RoughJS Polygon</title>
</head>
<body>
<svg width="800" height="800"></svg>
<script type="module">
import rough from '../../bin/rough.js';
const svg = document.querySelector('svg');
const rc = rough.svg(svg);
svg.appendChild(rc.polygon([
[10, 10],
[200, 10],
[100, 100],
[100, 50],
[300, 100],
[60, 200]
], { fillStyle: 'solid', stroke: 'black', strokeWidth: 2, fill: 'red', hachureAngle: 90 }));
</script>
</body>
</html>