W3C home > Mailing lists > Public > www-svg@w3.org > November 2011

Re: API for Retrieving Stroke Outline?

From: Vincent Hardy <vhardy@adobe.com>
Date: Sun, 13 Nov 2011 21:53:18 -0800
To: Rik Cabanier <cabanier@gmail.com>
CC: "www-svg@w3.org" <www-svg@w3.org>
Message-ID: <CAE5EAE6.219FA%vhardy@adobe.com>
From: Rik Cabanier <cabanier@gmail.com<mailto:cabanier@gmail.com>>
Date: Sun, 13 Nov 2011 19:55:38 -0800
To: Adobe Systems <vhardy@adobe.com<mailto:vhardy@adobe.com>>
Cc: "www-svg@w3.org<mailto:www-svg@w3.org>" <www-svg@w3.org<mailto:www-svg@w3.org>>
Subject: Re: API for Retrieving Stroke Outline?

Hi Vincent,

SVG has stroke features such as markers and dashing that Canvas does not have.
The end result of an outlined stroke might also be sensitive to winding rules. Canvas only seems to implement non-zero winding (and I'm unsure how well it implements that since it's just a footnote in the spec).

Are you thinking that we should extend canvas or should we make sure that the 'svg style stroke' is compatible with canvas?

You are thinking ahead of me :-). My interest is that as a user of both APIs, I would like to be able to have path objects that I can easily use with SVG <path> elements and fill/stroke into Canvas as well and I was thinking of basic things like union, intersections and transformations of the geometry (I.e, transforming a path's coordinates instead of adding a transform to the element) in addition of getting the stroked outline. I guess I have used Java2D too much which also has winding rules. I think you raise a good point that we will have to keep in mind when we design this API and see if we have to propose extensions to canvas.



On Thu, Nov 10, 2011 at 7:29 PM, Vincent Hardy <vhardy@adobe.com<mailto:vhardy@adobe.com>> wrote:
Hi Mike,

I share your interest in having an API for geometry manipulation, I think
it would be extremely helpful and if we create such an API, I think we
should be careful to make it work for both Canvas and SVG.


> I think Mike is looking for a JavaScript API to get the outlined stroke.
> The vector effects don't specify how you can do this.


Received on Monday, 14 November 2011 05:53:55 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 22:54:33 UTC