UNPKG

paper

Version:

The Swiss Army Knife of Vector Graphics Scripting

27 lines (26 loc) 1.41 kB
<!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title>Circle and Ellipse Testing</title> <link rel="stylesheet" href="../css/style.css"> <script type="text/javascript" src="../../dist/paper-full.js"></script> <script type="text/paperscript" canvas="canvas"> project.importSVG(document.getElementById('svg')); </script> </head> <body> <svg xmlns="http://www.w3.org/2000/svg" version="1.1" width="500" height="1000" id="svg"> <circle cx="40" cy="300" r="20" style="fill:orange;stroke:yellow;stroke-width:2px;stroke-dasharray:3px" id="circle1" /> <circle cx="60" cy="350" r="30" style="fill:red;stroke:black;stroke-width:5" id="circle2" /> <circle cx="160" cy="400" r="60" style="fill:blue;" id="circle3" /> <ellipse cx="240" cy="100" rx="220" ry="30" style="fill:purple" id="ellipse1"/> <ellipse cx="220" cy="70" rx="190" ry="20" style="fill:lime" id="ellipse2"/> <ellipse cx="210" cy="45" rx="170" ry="15" style="fill:yellow" id="ellipse3"/> <ellipse cx="240" cy="175" rx="220" ry="30" style="fill:yellow" id="ellipse4"/> <ellipse cx="220" cy="175" rx="190" ry="20" style="fill:white" id="ellipse5"/> <ellipse cx="300" cy="255" rx="100" ry="50" style="fill:yellow;stroke:purple;stroke-width:2" id="ellipse6"/> </svg> <canvas id="canvas" width="500" height="1000"></canvas> </body> </html>