This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 9236 - <canvas>: Detecting the intersection of Path objects
Summary: <canvas>: Detecting the intersection of Path objects
Status: RESOLVED DUPLICATE of bug 19013
Alias: None
Product: WHATWG
Classification: Unclassified
Component: HTML (show other bugs)
Version: unspecified
Hardware: All All
: P3 enhancement
Target Milestone: Needs Impl Interest
Assignee: Ian 'Hixie' Hickson
QA Contact: HTML WG Bugzilla archive list
Depends on:
Blocks: 11739 14579
  Show dependency treegraph
Reported: 2010-03-12 19:59 UTC by contributor
Modified: 2016-04-21 19:33 UTC (History)
8 users (show)

See Also:


Description contributor 2010-03-12 19:59:22 UTC

Add Path objects and intersects() function

Posted from:
Comment 1 Axel Dahmen 2010-03-12 20:05:35 UTC
It would be VERY feasible to know if two paths intersect.

A corresponding function would take two paths as parameters and return a boolean value.

This would require the following prerequisites, however:

  *  A "Path" object would need to be introduced in
     order to get a container to store a path.

  *  The Path object would provide the same path-related
     member function as the CanvasRenderingContext2D
     interface does.

  *  The Path object would provide the following member

       - intersects(path)

  *  The CanvasRenderingContext2D interface would
     provide the following new function:

       - drawPath(path)
Comment 2 Axel Dahmen 2010-03-12 23:21:53 UTC
I'd like to add that in this concept the Path object would also need to provide transformation functionality so that each path can be animated separately.
Comment 3 Ian 'Hixie' Hickson 2010-03-30 23:14:03 UTC
EDITOR'S RESPONSE: This is an Editor's Response to your comment. If you are satisfied with this response, please change the state of this bug to CLOSED. If you have additional information and would like the editor to reconsider, please reopen this bug. If you would like to escalate the issue to the full HTML Working Group, please add the TrackerRequest keyword to this bug, and suggest title and text for the tracker issue; or you may create a tracker issue yourself, if you are able to do so. For more details, see this document:

Status: Partially Accepted
Change Description: see diff given below
Rationale: Path primitives, including operations on them such as detecting intersections, are definitely on the cards, but first we have to wait for the current spec to be implemented properly, otherwise browsers will just be buggy and it'll all be useless. Baby steps.
Comment 4 Axel Dahmen 2010-04-01 09:40:08 UTC
I understand... Thanks!

I'm looking forward to the upcoming versions then.
Comment 5 Ian 'Hixie' Hickson 2012-02-29 22:30:02 UTC
Comment 6 Ian 'Hixie' Hickson 2012-02-29 22:53:34 UTC
I'm going to add path primitives in this round of additions, but testing for path intersection, and creating paths based on the intersection or union of other paths, in a later round. To not lose track of the request for detecting if paths intersect, I'm moving this back to LATER.
Comment 7 Michael[tm] Smith 2013-01-24 08:03:47 UTC
This bug was cloned to create HTML WG bug 19013.
Comment 8 Ian 'Hixie' Hickson 2013-03-19 23:46:16 UTC
Do any browser vendors want to do this?
Comment 9 Justin Novosad 2016-04-21 19:33:09 UTC

*** This bug has been marked as a duplicate of bug 19013 ***