Re: [webkit-dev] new APIs for strokes with dash in Canvas

2012-03-27 Thread Ian Hickson
On Fri, 23 Sep 2011, Young Han Lee wrote:

 I spent some time trying to find it, but couldn't. This bugzilla seems 
 to be the only place we can get information at the moment.
 
 https://bugzilla.mozilla.org/show_bug.cgi?id=662038

On Fri, 23 Sep 2011, Dirk Schulze wrote:

 The WebCore patch of Young is basically using the specified behavior of 
 stroke-dasharray and stroke-dashoffset in the SVG specification [1]. But 
 we wouldn't support units or percentages, just floating point numbers.

I've added something along these lines to the HTML specification. It's not 
quite the same API; see my e-mail to WHATWG (which I'll be sending in the 
next few days) for more discussion on the design decisions behind it.

-- 
Ian Hickson   U+1047E)\._.,--,'``.fL
http://ln.hixie.ch/   U+263A/,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'
___
webkit-dev mailing list
webkit-dev@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev


Re: [webkit-dev] new APIs for strokes with dash in Canvas

2011-12-19 Thread Young Han Lee
I spent some time trying to find it, but couldn't. This bugzilla seems to be
the only place we can get information at the moment.

https://bugzilla.mozilla.org/show_bug.cgi?id=662038


On Fri, Sep 23, 2011 at 1:44 PM, Ian Hickson i...@hixie.ch wrote:

 On Thu, 22 Sep 2011, Darin Fisher wrote:
 
  Do you know if anyone is working to add this to the spec for Canvas?
  It seems like it may not take much to get it added, given that FF
  already has an implementation.

 Dashed lines are on my list but were not a high priority. If there are
 implementations then I'm happy to add it -- the only reason I hadn't added
 it is because the moment I add anything to canvas, everyone implements it,
 dropping whatever else they were working on, and so if I keep adding
 canvas features nothing else gets done... :-)

 Is there any documentation on how this patch and Gecko's implementation
 work and what they support?

 --
 Ian Hickson   U+1047E)\._.,--,'``.fL
 http://ln.hixie.ch/   U+263A/,   _.. \   _\  ;`._ ,.
 Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'

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


[webkit-dev] new APIs for strokes with dash in Canvas

2011-09-22 Thread Young Han Lee
Hi all,

I have a patch to add webkitLineDash and webkitLineDashOffset APIs on
CanvasRenderingContext2D on https://bugs.webkit.org/show_bug.cgi?id=63933

The purpose of these APIs is to support for strokes with dash in Canvas.

Although the API is not specified in the HTML Canvas specification yet, I
believe it would be great to support the API. As Dirk said in the above bug,
Mozilla already implemented the APIs named mozDash and mozDashOffset[1], and
there seems to be many needs for the API. Some people even implemented their
own javascript functions to draw strokes with dash in Canvas[2,3].

As GraphicsContext already have an interface for strokes with dash,
setLineDash, all we have to do is exposing it to the JS level. So the syntax
and meaning of the new APIs is the same with the arguments of the
setLineDash. webkitLineDash is an array of float, and webkitLineDashOffset
is a float.

I uploaded a patch for JSC first. After the patch is landed, I will make a
follow-up patch for V8.

Any thought?


[1] https://bugzilla.mozilla.org/show_bug.cgi?id=662038
[2]
http://davidowens.wordpress.com/2010/09/07/html-5-canvas-and-dashed-lines/
[3]
http://stackoverflow.com/questions/7352769/dashed-curves-on-html5-canvas-bezier
___
webkit-dev mailing list
webkit-dev@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev


Re: [webkit-dev] new APIs for strokes with dash in Canvas

2011-09-22 Thread James Robinson
On Thu, Sep 22, 2011 at 7:31 PM, Young Han Lee joybro...@gmail.com wrote:

 Hi all,

 I have a patch to add webkitLineDash and webkitLineDashOffset APIs on
 CanvasRenderingContext2D on https://bugs.webkit.org/show_bug.cgi?id=63933

 The purpose of these APIs is to support for strokes with dash in Canvas.

 Although the API is not specified in the HTML Canvas specification yet, I
 believe it would be great to support the API. As Dirk said in the above bug,
 Mozilla already implemented the APIs named mozDash and mozDashOffset[1], and
 there seems to be many needs for the API. Some people even implemented their
 own javascript functions to draw strokes with dash in Canvas[2,3].

 As GraphicsContext already have an interface for strokes with dash,
 setLineDash, all we have to do is exposing it to the JS level. So the syntax
 and meaning of the new APIs is the same with the arguments of the
 setLineDash. webkitLineDash is an array of float, and webkitLineDashOffset
 is a float.

 I uploaded a patch for JSC first. After the patch is landed, I will make a
 follow-up patch for V8.

 Any thought?


Has this proposal been raised in the WHATWG, which specifies the canvas 2d
interface?  It sounds like in this email you have done most of the work
necessary for a good spec proposal (see
http://wiki.whatwg.org/wiki/FAQ#Is_there_a_process_for_adding_new_features_to_a_specification.3F
).

- James




 [1] https://bugzilla.mozilla.org/show_bug.cgi?id=662038
 [2]
 http://davidowens.wordpress.com/2010/09/07/html-5-canvas-and-dashed-lines/
 [3]
 http://stackoverflow.com/questions/7352769/dashed-curves-on-html5-canvas-bezier

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


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


Re: [webkit-dev] new APIs for strokes with dash in Canvas

2011-09-22 Thread Darin Fisher
Do you know if anyone is working to add this to the spec for Canvas?  It
seems like it may not take much to get it added, given that FF already has
an implementation.

-Darin

On Thu, Sep 22, 2011 at 7:31 PM, Young Han Lee joybro...@gmail.com wrote:

 Hi all,

 I have a patch to add webkitLineDash and webkitLineDashOffset APIs on
 CanvasRenderingContext2D on https://bugs.webkit.org/show_bug.cgi?id=63933

 The purpose of these APIs is to support for strokes with dash in Canvas.

 Although the API is not specified in the HTML Canvas specification yet, I
 believe it would be great to support the API. As Dirk said in the above bug,
 Mozilla already implemented the APIs named mozDash and mozDashOffset[1], and
 there seems to be many needs for the API. Some people even implemented their
 own javascript functions to draw strokes with dash in Canvas[2,3].

 As GraphicsContext already have an interface for strokes with dash,
 setLineDash, all we have to do is exposing it to the JS level. So the syntax
 and meaning of the new APIs is the same with the arguments of the
 setLineDash. webkitLineDash is an array of float, and webkitLineDashOffset
 is a float.

 I uploaded a patch for JSC first. After the patch is landed, I will make a
 follow-up patch for V8.

 Any thought?


 [1] https://bugzilla.mozilla.org/show_bug.cgi?id=662038
 [2]
 http://davidowens.wordpress.com/2010/09/07/html-5-canvas-and-dashed-lines/
 [3]
 http://stackoverflow.com/questions/7352769/dashed-curves-on-html5-canvas-bezier

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


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


Re: [webkit-dev] new APIs for strokes with dash in Canvas

2011-09-22 Thread Ian Hickson
On Thu, 22 Sep 2011, Darin Fisher wrote:

 Do you know if anyone is working to add this to the spec for Canvas?  
 It seems like it may not take much to get it added, given that FF 
 already has an implementation.

Dashed lines are on my list but were not a high priority. If there are 
implementations then I'm happy to add it -- the only reason I hadn't added 
it is because the moment I add anything to canvas, everyone implements it, 
dropping whatever else they were working on, and so if I keep adding 
canvas features nothing else gets done... :-)

Is there any documentation on how this patch and Gecko's implementation 
work and what they support?

-- 
Ian Hickson   U+1047E)\._.,--,'``.fL
http://ln.hixie.ch/   U+263A/,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'
___
webkit-dev mailing list
webkit-dev@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev


Re: [webkit-dev] new APIs for strokes with dash in Canvas

2011-09-22 Thread Young Han Lee
On Fri, Sep 23, 2011 at 1:44 PM, Ian Hickson i...@hixie.ch wrote:


 Is there any documentation on how this patch and Gecko's implementation
 work and what they support?


I spent some time trying to find it, but couldn't. This bugzilla seems to be
the only place we can get information at the moment.

https://bugzilla.mozilla.org/show_bug.cgi?id=662038
___
webkit-dev mailing list
webkit-dev@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev