W3C home > Mailing lists > Public > public-svg-wg@w3.org > October to December 2010

intersection/enclosure checking

From: Cameron McCormack <cam@mcc.id.au>
Date: Fri, 22 Oct 2010 15:55:27 +1300
To: public-svg-wg@w3.org
Message-ID: <20101022025527.GF23864@wok.mcc.id.au>
Should intersection/enclosure testing return true when the object being
tested is exactly on the border of the reference rectangle?  Consider
this document:

  <svg xmlns="http://www.w3.org/2000/svg">
    <line id="a" x1="0" y1="0" x2="10" y2="0"/>
    <script>
      var line = document.getElementById('a');
      var svg = line.parentNode;
      var r = svg.createSVGRect();
      r.x = 0; r.y = 0; r.width = 10; r.height = 10;
      alert(svg.checkIntersection(line, r));
      alert(svg.checkEnclosure(line, r));
    </script>
  </svg>

What should it alert?  (Came up while reviewing struct-dom-18-f.svg.)

Thanks,

Cameron

-- 
Cameron McCormack ≝ http://mcc.id.au/
Received on Friday, 22 October 2010 02:56:20 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Friday, 22 October 2010 02:56:22 GMT