W3C home > Mailing lists > Public > www-svg@w3.org > January 2013

Re: getStrokeBBox

From: Dirk Schulze <dschulze@adobe.com>
Date: Sat, 12 Jan 2013 21:52:48 -0800
To: Cameron McCormack <cam@mcc.id.au>
CC: "www-svg@w3.org" <www-svg@w3.org>
Message-ID: <E5C52AB9-C079-4807-99D9-72E35961BCB4@adobe.com>

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 GMT

This archive was generated by hypermail 2.3.1 : Friday, 8 March 2013 15:54:53 GMT