<!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>
