This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.
Section: http://www.whatwg.org/specs/web-apps/current-work/#2dcontext Comment: Add Path objects and intersects() function Posted from: 93.206.128.135
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 function: - intersects(path) * The CanvasRenderingContext2D interface would provide the following new function: - drawPath(path)
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.
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: http://dev.w3.org/html5/decision-policy/decision-policy.html 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.
I understand... Thanks! I'm looking forward to the upcoming versions then.
Proposal: http://wiki.whatwg.org/wiki/Canvas#Path_primitives
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.
This bug was cloned to create HTML WG bug 19013.
Do any browser vendors want to do this?
*** This bug has been marked as a duplicate of bug 19013 ***