Re: [webkit-dev] New Feature: Canvas Path object

2012-09-24 Thread Darin Adler
On Sep 22, 2012, at 9:21 PM, Elliott Sprehn espr...@chromium.org wrote:

 On Fri, Sep 21, 2012 at 6:34 AM, Dirk Schulze dschu...@adobe.com wrote:
 
 I would like to ask if there are objections to implement the canvas Path 
 object.
 
 Do we have metrics on how often people already have things named Path? All 
 other canvas objects have a prefix like CanvasGradient and CanvasPattern, 
 this thing seems inconsistent and more likely to break existing pages.

Dirk, given the fact that you quite logically referred to this as “the canvas 
Path object” when mentioning it to us, and the fact that both CanvasGradient 
and CanvasPattern objects exist, CanvasPath sure does seem like a nice name for 
this. Someone should make that suggestion on the WebApps mailing list!

-- Darin
___
webkit-dev mailing list
webkit-dev@lists.webkit.org
http://lists.webkit.org/mailman/listinfo/webkit-dev


Re: [webkit-dev] New Feature: Canvas Path object

2012-09-24 Thread Rik Cabanier
On Mon, Sep 24, 2012 at 10:27 AM, Darin Adler da...@apple.com wrote:

 On Sep 22, 2012, at 9:21 PM, Elliott Sprehn espr...@chromium.org wrote:

  On Fri, Sep 21, 2012 at 6:34 AM, Dirk Schulze dschu...@adobe.com
 wrote:
 
  I would like to ask if there are objections to implement the canvas
 Path object.
 
  Do we have metrics on how often people already have things named Path?
 All other canvas objects have a prefix like CanvasGradient and
 CanvasPattern, this thing seems inconsistent and more likely to break
 existing pages.

 Dirk, given the fact that you quite logically referred to this as “the
 canvas Path object” when mentioning it to us, and the fact that both
 CanvasGradient and CanvasPattern objects exist, CanvasPath sure does seem
 like a nice name for this. Someone should make that suggestion on the
 WebApps mailing list!


A difference though is that the path object doesn't have to be associated
with a canvas. It is/will be useful with other features such as SVG as well.
I feel uneasy with the generic name too; maybe a DOM/HTML/JS prefix is
better.
___
webkit-dev mailing list
webkit-dev@lists.webkit.org
http://lists.webkit.org/mailman/listinfo/webkit-dev


Re: [webkit-dev] New Feature: Canvas Path object

2012-09-24 Thread Dirk Schulze


On Sep 24, 2012, at 12:03 PM, Rik Cabanier 
caban...@gmail.commailto:caban...@gmail.com wrote:



On Mon, Sep 24, 2012 at 10:27 AM, Darin Adler 
da...@apple.commailto:da...@apple.com wrote:
On Sep 22, 2012, at 9:21 PM, Elliott Sprehn 
espr...@chromium.orgmailto:espr...@chromium.org wrote:

 On Fri, Sep 21, 2012 at 6:34 AM, Dirk Schulze 
 dschu...@adobe.commailto:dschu...@adobe.com wrote:

 I would like to ask if there are objections to implement the canvas Path 
 object.

 Do we have metrics on how often people already have things named Path? All 
 other canvas objects have a prefix like CanvasGradient and CanvasPattern, 
 this thing seems inconsistent and more likely to break existing pages.

Dirk, given the fact that you quite logically referred to this as “the canvas 
Path object” when mentioning it to us, and the fact that both CanvasGradient 
and CanvasPattern objects exist, CanvasPath sure does seem like a nice name for 
this. Someone should make that suggestion on the WebApps mailing list!
I am interested in the feature, not the name. I am fine with naming it 
CanvasPath. Remember that Path is not limited to Canvas, other then for 
instance SVGPathElement. I just want to avoid that people come to the 
impression that this can just be used for Canvas.




A difference though is that the path object doesn't have to be associated with 
a canvas. It is/will be useful with other features such as SVG as well.
I feel uneasy with the generic name too; maybe a DOM/HTML/JS prefix is better.

DOM and HTML will lead to the same wrong conclusions IMO. And JS seems unusual 
as prefix.

Greetings
Dirk
___
webkit-dev mailing list
webkit-dev@lists.webkit.org
http://lists.webkit.org/mailman/listinfo/webkit-dev


Re: [webkit-dev] New Feature: Canvas Path object

2012-09-24 Thread Maciej Stachowiak

I'm not hung up on the name. But if we are worried about name collision, we 
could do data gathering on use of Path or other candidate names instead of just 
guessing.

 - Maciej

On Sep 24, 2012, at 12:22 PM, Dirk Schulze dschu...@adobe.com wrote:

 
 
 On Sep 24, 2012, at 12:03 PM, Rik Cabanier caban...@gmail.com wrote:
 
 
 
 On Mon, Sep 24, 2012 at 10:27 AM, Darin Adler da...@apple.com wrote:
 On Sep 22, 2012, at 9:21 PM, Elliott Sprehn espr...@chromium.org wrote:
 
  On Fri, Sep 21, 2012 at 6:34 AM, Dirk Schulze dschu...@adobe.com wrote:
 
  I would like to ask if there are objections to implement the canvas Path 
  object.
 
  Do we have metrics on how often people already have things named Path? All 
  other canvas objects have a prefix like CanvasGradient and CanvasPattern, 
  this thing seems inconsistent and more likely to break existing pages.
 
 Dirk, given the fact that you quite logically referred to this as “the 
 canvas Path object” when mentioning it to us, and the fact that both 
 CanvasGradient and CanvasPattern objects exist, CanvasPath sure does seem 
 like a nice name for this. Someone should make that suggestion on the 
 WebApps mailing list!
 I am interested in the feature, not the name. I am fine with naming it 
 CanvasPath. Remember that Path is not limited to Canvas, other then for 
 instance SVGPathElement. I just want to avoid that people come to the 
 impression that this can just be used for Canvas.
 
 
 
  
 A difference though is that the path object doesn't have to be associated 
 with a canvas. It is/will be useful with other features such as SVG as well.
 I feel uneasy with the generic name too; maybe a DOM/HTML/JS prefix is 
 better.
 
 DOM and HTML will lead to the same wrong conclusions IMO. And JS seems 
 unusual as prefix.
 
 Greetings
 Dirk
 ___
 webkit-dev mailing list
 webkit-dev@lists.webkit.org
 http://lists.webkit.org/mailman/listinfo/webkit-dev

___
webkit-dev mailing list
webkit-dev@lists.webkit.org
http://lists.webkit.org/mailman/listinfo/webkit-dev


Re: [webkit-dev] New Feature: Canvas Path object

2012-09-23 Thread Dirk Schulze
I know of at least one JS library that uses Path as object (paper.js). But the 
definition can be overridden. It is unlikely that this will break content, as 
long as the library does not want to use both. Other then that, the SVG WG 
wants to reuse the Path object in SVG and CanvasObject might confuse people but 
this seems unlikely as well.

Greetings,
Dirk

Sent from my iPhone

On Sep 23, 2012, at 6:22 AM, Elliott Sprehn 
espr...@chromium.orgmailto:espr...@chromium.org wrote:


On Fri, Sep 21, 2012 at 6:34 AM, Dirk Schulze 
dschu...@adobe.commailto:dschu...@adobe.com wrote:
Hi WebKit,

I would like to ask if there are objections to implement the canvas Path object.


Do we have metrics on how often people already have things named Path? All 
other canvas objects have a prefix like CanvasGradient and CanvasPattern, this 
thing seems inconsistent and more likely to break existing pages.

- E

___
webkit-dev mailing list
webkit-dev@lists.webkit.org
http://lists.webkit.org/mailman/listinfo/webkit-dev


Re: [webkit-dev] New Feature: Canvas Path object

2012-09-22 Thread Elliott Sprehn
On Fri, Sep 21, 2012 at 6:34 AM, Dirk Schulze dschu...@adobe.com wrote:

 Hi WebKit,

 I would like to ask if there are objections to implement the canvas Path
 object.


Do we have metrics on how often people already have things named Path? All
other canvas objects have a prefix like CanvasGradient and CanvasPattern,
this thing seems inconsistent and more likely to break existing pages.

- E
___
webkit-dev mailing list
webkit-dev@lists.webkit.org
http://lists.webkit.org/mailman/listinfo/webkit-dev


[webkit-dev] New Feature: Canvas Path object

2012-09-21 Thread Dirk Schulze
Hi WebKit,

I would like to ask if there are objections to implement the canvas Path object.

The HTML Canvas specification and the WHAT WG HTML specification define the 
Path object [1][2]. The Path object and the CanvasRenderingContext2D share some 
graphics operations[3]: 

- closePath
- lineTo
- moveTo
- arc
- arcTo
- ellipse (not implemented yet)
- quadraticCurveTo
- cubicCurveTo
- rect

But instead of drawing onto a Canvas, the operations get applied to a Path 
object. Furthermore the object allows adding other Paths with transforms. A 
Path object can then be drawn onto a Canvas.

I opened https://bugs.webkit.org/show_bug.cgi?id=97333 for a patch and detailed 
discussions.

Greetings,
Dirk

[1] 
http://www.whatwg.org/specs/web-apps/current-work/multipage/the-canvas-element.html#path-objects
[2] http://dev.w3.org/html5/2dcontext/#path-objects
[3] 
http://www.whatwg.org/specs/web-apps/current-work/multipage/the-canvas-element.html#2dcontext
___
webkit-dev mailing list
webkit-dev@lists.webkit.org
http://lists.webkit.org/mailman/listinfo/webkit-dev