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

getStrokeBBox

From: Cameron McCormack <cam@mcc.id.au>
Date: Sun, 13 Jan 2013 16:45:01 +1100
Message-ID: <50F249DD.5020309@mcc.id.au>
To: "www-svg@w3.org" <www-svg@w3.org>
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.
Received on Sunday, 13 January 2013 05:44:35 GMT

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