title: Image blurry when using url fill pattern for svg circle
body: <p>I am trying to use <a href="http://bl.ocks.org/mbostock/raw/7607535/" rel="nofollow noreferrer">d3.js circle packing example</a> to fill a bunch of svg circles with images using SVG's pattern fill. My source images are 800x600, but the circles will be of varying sizes. I've set it up as follows:</p>
  
  <pre><code>  var patterns = defs.selectAll("pattern")
        .data(nodes.filter(function(d){ return !d.children }))
        .enter()
        .append('pattern')
        .attr('id',function(d){
          return 'id'+d.id
        })
        .attr('x','0')
        .attr('y','0')
        .attr('height',function(d){ return d.r*2})
        .attr('width',function(d){ return d.r*2*1.333333})
        .append('image')
        .attr('x','0')
        .attr('y','0')
        .attr('height',function(d){ return d.r*2})
        .attr('width',function(d){ return d.r*2*1.333333})
        .attr('xlink:href',function(d){
          return 'img/img' + d.image;
        })
  
    var circle = svg.selectAll("circle")
        .data(nodes)
      .enter().append("circle")
        .attr("class", function(d) { return d.parent ? d.children ? "node" : "node node--leaf" : "node node--root"; })
        .style("fill", function(d) {
          if (!d.children){
            return 'url(#id' + d.id + ')';
          } else {
            return d.children ? color(d.depth) : null;
          }
  
        })
  </code></pre>
  
  <p>so that my DOM renders like this:</p>
  
  <pre><code>&lt;defs id="cdef"&gt;
      &lt;pattern id="id65" x="0" y="0" height="326.8534904318234" width="435.8045449579344"&gt;
          &lt;image x="0" y="0" height="326.8534904318234" width="435.8045449579344" xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="img/img65.png"&gt;&lt;/image&gt;
      &lt;/pattern&gt;
      ...
  &lt;/defs&gt;
  </code></pre>
  
  <p>But when I do this, the images in the circle are super blown-out (see attached image). Any idea what's going on?<a href="https://i.stack.imgur.com/nv6Eb.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/nv6Eb.png" alt="enter image description here"></a></p>