- From: <bugzilla@jessica.w3.org>
- Date: Tue, 18 Oct 2011 16:37:27 +0000
- To: public-html-bugzilla@w3.org
http://www.w3.org/Bugs/Public/show_bug.cgi?id=14499 Summary: Need ability to reset Canvas clipping region without resetting all other Canvas state Product: HTML WG Version: unspecified Platform: PC OS/Version: Windows NT Status: NEW Severity: enhancement Priority: P2 Component: HTML Canvas 2D Context (editor: Ian Hickson) AssignedTo: ian@hixie.ch ReportedBy: simon.sarris@gmail.com QAContact: public-html-bugzilla@w3.org CC: mike@w3.org, public-html-wg-issue-tracking@w3.org, public-html@w3.org The clipping region is defined such that it can only get smaller and never larger. "The clip() method must create a new clipping region by calculating the intersection of the current clipping region and the area described by the current path, using the non-zero winding number rule." In other words, one cannot define a clipping region of (50,50,50,50) and then define a larger one of (0,0,200,200). The clipping region will still be (50,50,50,50). This rule itself is fine. But if one wants to clip and then reset the clipping region back to default (the entire canvas) there is currently no way to do that short of resetting all canvas state, either by changing the size of the canvas (destroys all state) or using save() and restore(). But there are plenty of reasons for wanting the canvas state to persist otherwise while resetting the clipping region. Most of them are performance/caching reasons that can make a significant difference. If one wanted to draw 7,000 strings with a single font but wanted a different clipping region for each, one would have to set the font property of the canvas 7,000 times instead of just once. This is murder on performance when it need not be necessary. -- Configure bugmail: http://www.w3.org/Bugs/Public/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA contact for the bug.
Received on Tuesday, 18 October 2011 16:37:31 UTC