mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-03 19:45:44 -05:00
32 lines
No EOL
1.1 KiB
HTML
32 lines
No EOL
1.1 KiB
HTML
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
|
<title>Stroke Bounds</title>
|
|
<link rel="stylesheet" href="../css/style.css">
|
|
<script type="text/javascript" src="../../dist/paper.js"></script>
|
|
<script type="text/paperscript" canvas="canvas">
|
|
project.currentStyle = {
|
|
strokeColor: 'black',
|
|
strokeWidth: 2,
|
|
strokeCap: 'round'
|
|
};
|
|
var isvg = new ImportSVG;
|
|
isvg.importSVG(document.getElementById('svg'));
|
|
</script>
|
|
</head>
|
|
<body>
|
|
<svg xmlns="http://www.w3.org/2000/svg" version="1.1" style="width:500px; height:500px; background:black;" id="svg">
|
|
<g>
|
|
<line x1="4" y1="20" x2="200" y2="200" style="stroke:red;stroke-width:1" id="line" />
|
|
<rect x="200" y="20" rx="20" ry="10" width="150" height="150" style="fill:green" id="round" />
|
|
</g>
|
|
<g>
|
|
<rect x="250" y="180" width="150" height="150" style="fill:blue" id="rect" />
|
|
<ellipse cx="120" cy="250" rx="100" ry="50" style="fill:yellow;" id="oval" />
|
|
</g>
|
|
<text x="20" y="15" fill="green">I love SVG</text>
|
|
</svg>
|
|
<canvas id="canvas" width="500" height="500"></canvas>
|
|
</body>
|
|
</html> |