Re: stroke=gradient for lines or horizontal paths

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.


-- 
Erik Dahlstrom, Core Technology Developer, Opera Software
Co-Chair, W3C SVG Working Group
Personal blog: http://my.opera.com/macdev_ed

Received on Wednesday, 13 July 2011 13:49:19 UTC