W3C home > Mailing lists > Public > www-svg@w3.org > February 2014

RE: [svg2] getStrokeBBox functionality has been replaced with getBBox dictionary argument

From: David Dailey <ddailey@zoominternet.net>
Date: Tue, 4 Feb 2014 13:35:01 -0500
To: "'Paul LeBeau'" <paul.lebeau@gmail.com>
Cc: "'Cameron McCormack'" <cam@mcc.id.au>, "'www-svg'" <www-svg@w3.org>
Message-ID: <002801cf21d7$d06aa910$713ffb30$@net>
I wrote:

>> I'm not sure why we'd want to allow so poor an approximation as the
bounding box of the control points (which could be very much looser than the
curve itself).


Paul wrote:

>Could be, but in my experience it is not all that common that it has as
major an effect as in your example.  Plus there are also use cases where a
fast and approximate bounding box is more desirable than a slow and accurate
one.  Perhaps one input to the algorithm might be a flag to indicate that
you would be satisfied with an approximation.


Hi Paul,


If I understand the math here (it's questionable), it's not time consuming
(linear, I think, in the number of control points in a path comprised of
cubic and quadratic segments). See  [1] for a nice little working demo where
one drags control points and the BB adjusts.


I also think that the case I presented is not at all unusual, nor extremal.
See lots of different cases at  [2].





[1]  http://floris.briolas.nl/floris/2009/10/bounding-box-of-cubic-bezier/ 


[2] http://www.math.ucla.edu/~baker/149.1.02w/handouts/bb_bezier.pdf 
Received on Tuesday, 4 February 2014 18:35:32 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 8 March 2017 09:47:35 UTC