Fix for blocker bug #953992, Imported pattern fill disappers while transforming (regression)
Hi devs,
I might just have fixed this blocker bug: https://bugs.launchpad.net/inkscape/+bug/953992; well at least the problem cannot be reproduced and I haven't noticed any new regressions, but I am not sure if this fix is correct. Let me try to explain:
When a pattern is imported, e.g. from Adobe Illustrator, then it might have a view box set. This is just fine, as this viewbox is accounted for by Inkscape. Now when an object that uses this pattern is moved, a new pattern is introduced to account for the translation. So we now have: object -> mother pattern (with transform) -> child pattern (as imported)
The child pattern has a view box set, but the current code only considered the viewbox of the newly introduced mother pattern... which didn't have a viewbox set. This is why the pattern wasn't drawn. I've modified the code to consider the viewbox of the child pattern instead. This works for the files attached to the bug report, and doesn't seem to break anything. However, isn't this all a bit too fragile? What if both the mother pattern and child pattern have a view box set? Is there a teeny-tiny wibbly-wobbly subset of documents in which this can actually occur? ;-).
BTW, our stock patterns do not have a viewbox, and neither do patterns generated from objects. This is why this bug was only visible for imported patterns. Also, this bug was introduced when moving to the new cairo rendered in which a significant part of pattern rendering code (in sp-pattern.cpp) was modified.
Thanks,
Diederik
On Sat, 2013-09-14 at 23:20 +0200, Diederik van Lierop wrote:
Is there a teeny-tiny wibbly-wobbly subset of documents in which this can actually occur? ;-).
It could be, but it's always good to have documents constructed which exhibit the problem you suspect. If you can build it, then I'm sure it can be fixed.
The other thing about wibbly-wobbly cases, is that they might not be blockers.
Martin,
participants (2)
-
Diederik van Lierop
-
Martin Owens