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

Re: stroke=gradient for lines or horizontal paths

From: Dirk Schulze <vbs85@gmx.de>
Date: Wed, 13 Jul 2011 16:01:49 +0200
Cc: "Robert Longson" <longsonr@gmail.com>, "Alex Danilo" <alex@abbra.com>, www-svg@w3.org
Message-Id: <605DBF99-9970-4210-88D3-E00264FCAACE@gmx.de>
To: Erik Dahlstrom <ed@opera.com>

Am 13.07.2011 um 15:48 schrieb Erik Dahlstrom:

> On Wed, 13 Jul 2011 14:43:31 +0200, Alex Danilo <alex@abbra.com> wrote:
>> Hi Robert,
>> --Original Message--:
>>> Alex,
>>>> Which of course begs the question - how do you get
>>>> the bounding box of a stroked object through the DOM?
>>> You can call getBoundingClientRect
>>> https://developer.mozilla.org/en/DOM/element.getBoundingClientRect
>>> This works on IE9 and Firefox. I'm not sure where else it is implemented.
>> Thanks.
>> But can you point me at the W3C spec. that defines this, or
>> is this another vendor specific extension?
> http://www.w3.org/TR/cssom-view/#the-getclientrects (or http://dev.w3.org/csswg/cssom-view/#the-getclientrects-and-getboundingclientrect-methods if you wanted an editor's draft).
> Now, it doesn't say that it should return anything else than the boundingbox defined by the SVG specification, and that definition doesn't include the stroke.
> There is no DOM method available to get a bbox including the stroke/filter effects/markers or any combination thereof in SVG 1.1. That doesn't exclude the possibility of adding that functionality to SVG2 of course, which I assume is what Alex was getting at.
Even if it is off-topic.  I think this would be a great idea to have a boundingBox of the stroked objects that may intersects with clipping and masking rects. It would provide the visible area of the object. Just Filter is difficult, since it can replace all rects mentioned before.

Received on Wednesday, 13 July 2011 14:02:23 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 8 March 2017 09:47:25 UTC