[whatwg] Questions regarding Path object

Elliott Sprehn esprehn at gmail.com
Mon Nov 11 14:17:55 PST 2013

On Mon, Nov 4, 2013 at 9:14 AM, Rik Cabanier <cabanier at gmail.com> wrote:

> On Mon, Nov 4, 2013 at 2:07 AM, Jürg Lehni <lists at scratchdisk.com> wrote:
> > Thinking more about this discussion, I had an idea for an approach that
> > would avoid such future clashes all together:
> >
> > Instead of exposing constructors, why not simply expose the methods that
> > create them?
> >
> > There already are such functions for gradients:
> >
> > ctx.createRadialGradient()
> > ctx.createLinearGradient()
> >
> > Wouldn't it have been more aligned with this existing API also to have a
> > ctx.createPath() ?
> The SVG WG would like to start using the 'Path' object for its objects as
> well. We'd like this to be a generic object that can be used by other parts
> of the web platform.
> It would be strange to require a canvas context just to create pathh.
I'd like to again say I don't think this thing should be called Path. Lots
of other things have "Paths", like maps, file systems, urls, why does the
drawing one get to take the global namespace?

Given that there's a bunch of new objects with Drawing as the prefix, I
think we should name this DrawingPath like DrawingStyle and friends.

- E

More information about the whatwg mailing list