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 16704 - Shouldn't there be a setClip() rather than a resetClip(). There is already a transform() and setTransform(). Shouldn't clip follow the same conventions?
Summary: Shouldn't there be a setClip() rather than a resetClip(). There is already a...
Status: RESOLVED WONTFIX
Alias: None
Product: WHATWG
Classification: Unclassified
Component: HTML (show other bugs)
Version: unspecified
Hardware: Other other
: P3 normal
Target Milestone: Unsorted
Assignee: Ian 'Hixie' Hickson
QA Contact: contributor
URL: http://www.whatwg.org/specs/web-apps/...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-04-11 22:29 UTC by contributor
Modified: 2012-09-14 18:07 UTC (History)
2 users (show)

See Also:


Attachments

Description contributor 2012-04-11 22:29:47 UTC
Specification: http://www.whatwg.org/specs/web-apps/current-work/multipage/the-canvas-element.html
Multipage: http://www.whatwg.org/C#dom-context-2d-resetclip
Complete: http://www.whatwg.org/c#dom-context-2d-resetclip

Comment:
Shouldn't there be a setClip() rather than a resetClip().  There is already a
transform() and setTransform().  Shouldn't clip follow the same conventions?

Posted from: 192.91.66.186
User agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_6_8) AppleWebKit/535.19 (KHTML, like Gecko) Chrome/18.0.1025.151 Safari/535.19
Comment 1 contributor 2012-07-18 17:20:14 UTC
This bug was cloned to create bug 18117 as part of operation convergence.
Comment 2 Ian 'Hixie' Hickson 2012-09-14 18:07:27 UTC
clip() and transform() are analogous. There's no equivalent of setTransform() for clip (you have to reset then clip), and no equivalent of resetClip() for transforms (you have to set it to the identity matrix).

Given that, the current naming is consistent. One could argue that we should provide different functionality, I guess, but the current methods are based on what we expect to be common.