Closed RazrFalcon closed 2 years ago
Thanks, I don't have any intuition here so I defer to @raphlinus.
I will take a look, hopefully soon.
This looks like a correct bounding box to me. Is the problem that you're looking for the coarse bounding box, ie enclosing box including Bézier control points?
Ok, nevermind, I was really dumb. I misunderstood the issue and messed up points order in CGPath
(the first point should be an end point and not p1...). The bug was in my code and also very dumb.
Sorry for bothering you.
Hi! A user reported a bug in resvg that relates to Path bbox calculation. While
resvg
doesn't useBezPath::bounding_box
directly, it relies onkurbo::CubicBez::bounding_box
(like this). And it seems likeBezPath::bounding_box
is affected in a similar way.Here is a sample SVG:
I've tried calculating a bbox of this path using various libraries and it seems like
tiny-skia
and CoreGraphics return the same results, whilekurbo
is different.Results:
Kurbo (master):
tiny-skia (master) (aka Skia):
CoreGraphics on mac 12.4