Re: getStrokeBBox

On Jan 12, 2013, at 9:45 PM, Cameron McCormack <cam@mcc.id.au> wrote:

> In https://svgwg.org/hg/svg2/rev/b150b364d4a5 getStrokeBBox() changed to 
> include markers as well.  Two things (did we discuss these before?):
> 
> 
> 1. I think there could be a better name for this method if it's 
> including all of fill, stroke and markers.  Maybe getPaintBBox()?  That 
> sounds like it includes all of the regions where paint is laid down. 
> Alternatively, maybe this could be an argument to getBBox() instead?
> 
>   dictionary BBoxOptions {
>     boolean fill;
>     boolean stroke;
>     boolean markers;
>   };
> 
>   interface SVGLocatableElement {
>     ...
>     SVGRect getBBox(BBoxOptions options);
>     ...
>   };
> 
> Then:
> 
>   myElement.getBBox({ fill: true, stroke: true });
> 
> 
> 2. The spec says:
> 
>   getStrokeBBox()
>     Returns the union of the tight bounding box (see getBBox), the
>     stroke bounding box and the stroke bounding box of applied
>     markers ...
> 
> That doesn't sound quite right, as it would not include the fill of any 
> element inside any applied markers.  Or is the second "stroke bounding 
> box" in the quoted text meant to be a recursive reference to 
> getStrokeBBox()?  That might be another argument for a different name 
> from getStrokeBBox.
> 

I am fine with the changes, the fill of markers should be included. However, getPainBBox() would not be correct either, since the result of clipping, masking, filter and opacity does not influence this box.

Greetings,
Dirk

Received on Sunday, 13 January 2013 05:53:22 UTC