W3C home > Mailing lists > Public > whatwg@whatwg.org > September 2013

Re: [whatwg] Clipping text in in canvas

From: Rik Cabanier <cabanier@gmail.com>
Date: Sun, 15 Sep 2013 17:05:52 -0700
Message-ID: <CAGN7qDAnndDR038gy0BmrRwdEy4BvYOti5AOBmMdmyoj7GG7aA@mail.gmail.com>
To: "Jasper St. Pierre" <jstpierre@mecheye.net>
Cc: "whatwg@whatwg.org" <whatwg@whatwg.org>
I think that by 'clipping region', the spec means the 'region that is not

You can clip anything (including text) in canvas. ie

On Sun, Sep 15, 2013 at 8:38 AM, Jasper St. Pierre <jstpierre@mecheye.net>wrote:

> 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
Received on Monday, 16 September 2013 00:06:20 UTC

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 17:00:09 UTC