| <!DOCTYPE html> |
| <!-- DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. --> |
| <title>Canvas test: 2d.path.stroke.prune.closePath.quadraticCurve</title> |
| <h1>2d.path.stroke.prune.closePath.quadraticCurve</h1> |
| <p class="desc">Test if zero-lengthed closePath before and after quadratic curve are ignored corrected.</p> |
| <canvas id="canvas" width="100" height="50"> |
| <p class="fallback">FAIL (fallback content)</p> |
| </canvas> |
| <script> |
| const canvas = document.getElementById("canvas"); |
| const ctx = canvas.getContext('2d'); |
| |
| ctx.fillStyle = '#0f0'; |
| ctx.fillRect(0, 0, 100, 50); |
| |
| ctx.strokeStyle = '#f00'; |
| ctx.lineWidth = 10; |
| ctx.lineCap = 'round'; |
| ctx.lineJoin = 'round'; |
| |
| ctx.moveTo(10, 10); |
| ctx.quadraticCurveTo(80, 10, 100, 50); |
| ctx.closePath(); |
| ctx.stroke(); |
| </script> |