Re: [whatwg] Questions regarding Path object

On Tue, Apr 9, 2013 at 3:27 PM, Jürg Lehni <lists@scratchdisk.com> wrote:

> 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.
>

We are working on a new matrix class [1] that can do 2d as well as 3d.


>
> > 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
>

Path2d and Shape2d sound reasonable. I don't think there's a immediate need
to harmonize gradients so we probably want to keep CanvasGradient.


1: https://dvcs.w3.org/hg/FXTF/raw-file/tip/matrix/index.html

Received on Tuesday, 9 April 2013 23:18:01 UTC