Re: [whatwg] Questions regarding Path object

On Apr 9, 2013, at 14:52 , Rik Cabanier <cabanier@gmail.com> wrote:

> It is not too late. Someone started the implementation on Firefox but it
> stalled. [1]
> The Webkit implementation is behind a compile time flag so it can still
> change.

Great!

> The intent is that we can use this object with SVG as well so we would like
> to avoid prefixing it with 'Canvas'.

That makes a lot of sense. A similar issue exists with SVGMatrix, which apparently is going to be used for Canvas too.

> Can you think of another prefix so people don't assume that shape and path
> are specific to canvas?

Why not prefixing everything with Graphics, or suffixing with 2D?

Path, Shape, Gradient, Matrix all seem way too generic, and will definitely clash with many libraries. It was pointed out before that Path could also be a  object describing a file path, not necessarily a (2D) gemoetric path.

I like the following naming scheme, as it is really short and already familiar for people from the Java world, but I can imagine that a prefix would be preferred.

Path2D, Shape2D, Gradient2D, Matrix2D 

Jürg

Received on Tuesday, 9 April 2013 22:28:03 UTC