paper.js/examples/SVG Import/Text Testing.html

26 lines
No EOL
867 B
HTML

<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Text Testing</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'
};
ImportSvg.importSvg(document.getElementById('svg'));
</script>
</head>
<body>
<svg xmlns="http://www.w3.org/2000/svg" version="1.1" style="width:500px; height:1000px;" id="svg">
<text x="20" y="15" stroke="green" fill="green" style="font:15px arial;" id="text">Plain SVG Text</text>
<text x="20" y="50" fill="red" transform="rotate(30 20,40)">Rotated SVG Text</text>
</svg>
<canvas id="canvas" width="500" height="1000"></canvas>
</body>
</html>