Wrong bounding box calculated for objectBoundingBox units
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Inkscape |
Fix Released
|
Medium
|
Unassigned |
Bug Description
The SVG 1.1 specification defines an object's bounding box (for use with
objectBoundingBox units) as:
"The bounding box is computed *exclusive* of any values for clipping,
masking, filter effects, opacity and *stroke-width*."
See:
http://
Inkscape DOES take stroke into account however, and this can give the wrong
results when a gradient uses objectBoundingBox units for example (see the
attachment).
I verified that Batik (and Firefox) indeed behave like I suggest (they
don't take stroke into account when calculating the bouding box).
The attached SVG file shows the problem. It contains four rectangles with a
linear gradient, the upper two use objectBoundingBox units, the lower two
userSpaceOnUse units. With Batik (and Firefox) all gradients match exactly,
in Inkscape the topmost gradient is stretched.
BTW, in some cases it is useful to incorporate stroke in the bounding box
(see thread "bbox calculation" on the developers mailinglist and bug
#166659 (sf1230603)).
Changed in inkscape: | |
status: | New → Confirmed |
description: | updated |
Changed in inkscape: | |
status: | Fix Committed → Fix Released |
Originator: NO
Thanks for the bug report. Mental, can you provide your thoughts on
this?