Re: Clarification on object bounding box specification

On Thu, 14 Feb 2013 00:20:42 +0100, Dirk Schulze <dschulze@adobe.com>  
wrote:

>
> On Feb 13, 2013, at 1:28 PM, Philip Rogers <pdr@google.com> wrote:
>
>> www-svg,
>>
>> The following wording is currently in the spec:
>> "Keyword objectBoundingBox should not be used when the geometry of the  
>> applicable element has no width or no height, such as the case of a  
>> horizontal or vertical line, even when the line has actual thickness  
>> when viewed due to having a non-zero stroke width since stroke width is  
>> ignored for bounding box calculations. When the geometry of the  
>> applicable element has no width or height and objectBoundingBox is  
>> specified, then the given effect (e.g., a gradient or a filter) will be  
>> ignored."
>>
>> For patterns/gradients, this is not intuitive. A horizontal line has an  
>> empty bounding box and will not be stroked with a pattern. A slightly  
>> rotated line will be stroked with a pattern.
>
> I think you do not mean rotation, since a transform does not affect the  
> OBB.
>
>>
>> Opera, IE10*, and Chrome* all follow the spec's wording.
>> Firefox does not, and renders the stroked, horizontal patterned line.
>>
>> I think Firefox's implementation is the most intuitive for end users  
>> and I would like to propose we align on their interpretation of the  
>> spec.
>>
>> Testcase: http://philbit.com/emptyPattern.svg
>> Chrome bug: https://code.google.com/p/chromium/issues/detail?id=175779
>
> I do not see a difference across browsers. All browser display a green  
> blue patterned stroke. I think this wording was added because of  
> problems with gradients and calculating the gradient user space. I might  
> be wrong about that.
>
> Greetings,
> Dirk
>
>>
>> Philip
>>
>>
>> * Both IE10 and WebKit have a similar bug where the pattern shows up  
>> after a relayout.


Not the first time this has come up, sounds like a duplicate of ISSUE-2416  
[1].


[1] http://www.w3.org/Graphics/SVG/WG/track/issues/2416

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

Received on Thursday, 14 February 2013 08:26:04 UTC