summaryrefslogtreecommitdiffstats
path: root/dom/canvas/test/reftest/filters/subregion-stroke-paint.html
blob: 24ed92a9be133288dd2d75f92e3661ab3f6846e1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
<!DOCTYPE html>
<html>
<body>
<svg style="display: block; width: 0; height: 0">
  <defs>
    <filter id="merge" primitiveUnits="objectBoundingBox">
      <feMerge x="25%" y="25%" width="50%" height="50%">
        <feMergeNode in="SourceGraphic"/>
        <feMergeNode in="StrokePaint"/>
      </feMerge>
    </filter>
  </defs>
</svg>
<canvas id="canvas" width="100" height="100"></canvas>
<script>

var canvas = document.getElementById('canvas');
var ctx = canvas.getContext('2d');

ctx.filter = 'url(#merge)';
ctx.strokeStyle = '#0f0';
ctx.arc(50, 50, 25, 0, Math.PI * 2, true);
ctx.fill();

</script>
</body>
</html>