W3C home > Mailing lists > Public > whatwg@whatwg.org > March 2014

Re: [whatwg] Questions regarding Path object

From: Jürg Lehni <lists@scratchdisk.com>
Date: Tue, 18 Mar 2014 10:38:56 +0100
Message-Id: <97A18663-7313-409F-9641-0BB4AA394F2E@scratchdisk.com>
To: Rik Cabanier <cabanier@gmail.com>
Cc: "whatwg@lists.whatwg.org" <whatwg@lists.whatwg.org>, Elliott Sprehn <esprehn@gmail.com>
So is currentPath going away then for sure? Will there still be a way to  to retrieve a Path2D representation of the path being drawn by the long existing drawing commands on the context?

I quite liked how I could use it for caching, in case the browser supported that feature, and check wether I have a cached path the next time I need to draw it, falling back on redrawing it using the same drawing commands. Doing the same by feature-detecting the Path(2D) constructor and building separate drawing approaches based on its existence results in much more complicated code.

J

On Mar 14, 2014, at 23:18 , Rik Cabanier <cabanier@gmail.com> wrote:

> 
> 
> 
> On Wed, Dec 4, 2013 at 5:18 PM, Rik Cabanier <cabanier@gmail.com> wrote:
> 
> 
> 
> On Wed, Dec 4, 2013 at 11:10 AM, Jürg Lehni <lists@scratchdisk.com> wrote:
> I somehow managed to oversee all the things that happened in this discussion, but I'm very happy to see that Path2D is being proposed and agreed on now. It's also what I've originally suggested on April 10 this year, and I completely agree that it leaves much less doubt about its functionality and context of use. It also has a history as a term in Java2D:
> 
> http://docs.oracle.com/javase/7/docs/api/java/awt/geom/Path2D.html
> 
> So is this going through?
> 
> Yes, all that need to happen is for someone to implement this :-)
> 
> Path2D has now landed in Blink [1]. Blink also implemented the 'addPath' method.
> WebKit just landed a patch to rename Path to Path2D, remove currentPath and add fill/stroke/clip with a path [2].
> A patch is under review for Firefox to add Path2D.
> 
> Given this, can we change the spec to reflect the new name?
> 
> 1: https://codereview.chromium.org/178673002/
> 2: https://webkit.org/b/130236
> 3: https://bugzilla.mozilla.org/show_bug.cgi?id=830734
> 
>  
> On Nov 18, 2013, at 19:03 , Elliott Sprehn <esprehn@gmail.com> wrote:
> 
> > On Monday, November 18, 2013, Rik Cabanier wrote:
> >
> >>
> >>
> >>
> >> On Wed, Nov 13, 2013 at 1:36 PM, Robert O'Callahan <robert@ocallahan.org<javascript:_e({}, 'cvml', 'robert@ocallahan.org');>
> >>> wrote:
> >>
> >>> On Wed, Nov 13, 2013 at 12:12 PM, Jussi Kalliokoski <
> >>> jussi.kalliokoski@gmail.com <javascript:_e({}, 'cvml',
> >>> 'jussi.kalliokoski@gmail.com');>> wrote:
> >>>
> >>>> Path is also too generic even in the context of graphics. If we later on
> >>>> want to add a path object for 3-dimensional paths, you end up with Path
> >>>> and
> >>>> Path3D? Yay for consistency. Path2D would immediately inform what
> >>>> dimensions we're dealing with and also that this is to do with graphics,
> >>>> and thus sounds like a good name to me.
> >>>>
> >>>
> >>> Sounds good to me.
> >>>
> >>
> >> Elliot,
> >>
> >> what do you think, is Path2D acceptable?
> >>
> >
> > Sounds great to me, lets do it!
> >
> > - E
> 
> 
> 
Received on Tuesday, 18 March 2014 09:39:28 UTC

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 17:00:17 UTC