[whatwg] Clipping text in in canvas

Jasper St. Pierre jstpierre at mecheye.net
Sun Sep 15 08:38:19 PDT 2013


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. [0]

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?
[0]
http://www.whatwg.org/specs/web-apps/current-work/multipage/the-canvas-element.html#drawing-text-to-the-bitmap

-- 
  Jasper


More information about the whatwg mailing list