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

Re: [whatwg] Questions regarding Path object

From: Rik Cabanier <cabanier@gmail.com>
Date: Tue, 9 Apr 2013 16:17:36 -0700
Message-ID: <CAGN7qDAvnfCEqh7Cp8hgo0kWW11wpJE0UBwTaghwkPB7tya5iQ@mail.gmail.com>
To: Jürg Lehni <lists@scratchdisk.com>
Cc: whatwg@lists.whatwg.org
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

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 16:59:57 UTC