[whatwg] Clipping text in in canvas
ddailey at zoominternet.net
Sun Sep 15 09:19:25 PDT 2013
I'm sure there are such uses and I'm assured that you have one. I was just
sending out my canned reminder that alternatives to canvas exist (many folks
seemed not to know that, only a few years ago).
Cheers and regards
From: magcius at gmail.com [mailto:magcius at gmail.com] On Behalf Of Jasper St.
Sent: Sunday, September 15, 2013 12:09 PM
To: David Dailey
Cc: whatwg at whatwg.org
Subject: Re: [whatwg] Clipping text in in canvas
On Sun, Sep 15, 2013 at 12:04 PM, David Dailey <ddailey at zoominternet.net>
Last I checked applying a clipPath to text in SVG works consistently across
browsers, and there it remains accessible: to screen readers, indexing,
searching, drag-to-select, etc. Why would one want a bunch of pixels that
I have an insane, complex use case, and you'd laugh at me if I told you what
it was, but trust me when I say I need an immediate mode drawing API like
<canvas> instead of a retained scene graph like SVG.
From: whatwg-bounces at lists.whatwg.org
[mailto:whatwg-bounces at lists.whatwg.org] On Behalf Of Jasper St. Pierre
Sent: Sunday, September 15, 2013 11:38 AM
To: whatwg at whatwg.org
Subject: [whatwg] Clipping text in in canvas
The canvas specification maintains:
These shapes are painted without affecting the current path, and are
subject to shadow effects, global alpha, the clipping region, and global
composition operators. 
But no browsers I tested actually implement the "clipping region" part.
Should this be removed for backwards compatibility reasons? Should we
introduce a new method of clipping text be introduced, or should we just
require users who want to draw clipped text to draw to a scratch canvas and
use drawImage to copy the pixels?
More information about the whatwg