Blur is applied after transform, not before
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Inkscape |
Fix Released
|
Critical
|
Buliabyak-users |
Bug Description
Blurring a shape and then transforming it non uniformly - either by scaling
in one direction only or shearing it applies the filter attribute _before_
the transform attribute.
While this is a perfectly valid way to look at it (and I assume this is to
spec as far as SVG is concerned), I would guess that beginner users may be
confused as I think that it is more intuitive to consider blur as applying
orthogonally unless they explicitly group an object and then transform it.
Stroke, for example, is ALWAYS orthogonal regardless of transformations.
Either way, this poses a problem: after blur is applied there are two
different transformations that can be applied - to the underlying shape and
to the result of the blur filter on that shape.
Inkscape only allows the latter - the former is not possible.
Incidentally, non-uniform scaling of blurred shapes causes Inkscape to
compute the bounding box for the blur filter wrongly - this is another bug
but not one I can be bothered to post separately.
Possible solutions:
- Alter the transform operation on blurred objects to apply the the
underlying object (unless the blur object is later grouped).
- Add another button alongside the current four, (scale stroke, rounded
corners, transform gradients and patterns). This would provide a toggle as
to whether blur is transformed at all.
- Alter the semantics of filters, allowing child objects of filters to be
selected rather than just the result. Even better would be to unify all
non-commutative filters, including clip, mask, and blur plus any future
filters (note that opacity is probably not commutative with all of the
filters SVG specifies and would also have to be included when those were
implemented) within one "Filter Properties" window, which would, like the
Layers window, allow filters to be moved up or down in the stack, deleted
and added, and let transformations be modified at every level of the stack.
Originator: NO
I'm aware of this bug, and it's actually pretty bad because per my reading
of SVG spec, you transform AFTER the filter, not before (and Batik applies
it after the filter too). We are not compliant with this and it really
can't be fixed without a very serious rearchitecturing of Inkscape's
internals.