paint2d-roundRect-ref.html (313B)
1 <!DOCTYPE html> 2 <html> 3 <body> 4 <canvas id ="output" width="100" height="100" style="background: blue;"></canvas> 5 <script> 6 var canvas = document.getElementById('output'); 7 var ctx = canvas.getContext('2d'); 8 9 ctx.fillStyle = 'green'; 10 ctx.roundRect(10, 10, 80, 80, [20, 40, 10]); 11 ctx.fill(); 12 </script> 13 </body> 14 </html>