[whatwg] [canvas] inner shadows
cabanier at gmail.com
Sat Nov 24 09:03:36 PST 2012
On Sat, Nov 24, 2012 at 8:36 AM, Ian Hickson <ian at hixie.ch> wrote:
> On Sat, 24 Nov 2012, Rik Cabanier wrote:
> > > >
> > > > How about the strokes?
> > >
> > > The example in the OP didn't have them, but you'd have to include them
> > > in the fill area. With the new Path objects, you'd just use
> > > addPathByStrokingPath(), which would be relatively simple.
> > Unfortunately the winding rules will mess up your shape. (non-zero
> > winding)
> > Take for instance a stroked circle. The stroke which is added with
> > addPathByStrokingPath will always create a hole so you end up with a
> > donut instead of just a slightly larger circle.
> > > So long as they don't overlap, that's not generally a problem. But
> > > sure, for some complex shapes you'd need some new feature or other,
> > > whether it's in shadows or path construction or elsewhere.
> In the case of a circle, if you wanted to draw the inner shadow over the
> stroke and the fill, you'd have to create the path as just a fill with the
> radius increased by half the line width.
That seems like a heavy burden to place on the developer.
Hopefully there are no round joins, endcaps or dashes.
I think addPathByStrokingPath is almost useless. Those methods should all
More information about the whatwg