"Hatching" fill effect renders when .svg is opened directly, but not when it is imported into an existing document

Bug #1460057 reported by Alistair Muldal
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Inkscape
Fix Released
Medium
Ben Scholzen 'DASPRiD'

Bug Description

I've noticed some strange behavior while importing .svg images containing a "cross-hatching" effect (the images are plots generated by matplotlib). When I <Open...> such an image directly in Inkscape, the hatching displays correctly, but if I <Import...> the image into an existing project then the hatching does not appear.

To reproduce the problem, create a new document then try to import this example image into it: http://imgh.us/test_hatching.svg. The same image will render correctly if you open it directly, or if you copy-paste it into the document rather than going via the <Import...> dialog.

I can reproduce the bug in v0.91 and in a recent trunk build (0.91.0+devel+14178+59~ubuntu15.04.1).

Tags: importing svg
description: updated
Revision history for this message
Ben Scholzen 'DASPRiD' (dasprid) wrote :

Confirmed. It seems like there are three <svg:defs> in the file, but only the first one is imported. The hatching pattern itself is defined in the last <svg:defs>.

Revision history for this message
Ben Scholzen 'DASPRiD' (dasprid) wrote :

I have prepared a patch which solves the problem. If it looks okay, I can merge it to trunk.

Revision history for this message
Ben Scholzen 'DASPRiD' (dasprid) wrote :

New patch based on discussion on IRC.

Changed in inkscape:
assignee: nobody → Ben Scholzen 'DASPRiD' (dasprid)
status: New → Confirmed
Revision history for this message
Ben Scholzen 'DASPRiD' (dasprid) wrote :

Fix committed with revision 14185.

Changed in inkscape:
status: Confirmed → Fix Committed
su_v (suv-lp)
tags: added: importing svg
Changed in inkscape:
importance: Undecided → Medium
milestone: none → 0.92
Revision history for this message
su_v (suv-lp) wrote :

Backporting to 0.91.x needs testing (diff doesn't apply as it), but might work (according to Mc-).

tags: added: backport-proposed
Revision history for this message
Alistair Muldal (alimuldal) wrote :

Excellent - I can confirm that 14185 resolved the issue for me. Really appreciate the quick fix!

Revision history for this message
su_v (suv-lp) wrote :

Fix backported to 0.91.x in rev 13797.

Changed in inkscape:
milestone: 0.92 → 0.91.1
tags: removed: backport-proposed
Revision history for this message
su_v (suv-lp) wrote :

@Mc - could you please verify that the backport is ok? It tested ok with two local 0.91.x builds, but I'd be glad for a second check.

trunk:
https://bazaar.launchpad.net/~inkscape.dev/inkscape/trunk/revision/14185
0.91.x:
https://bazaar.launchpad.net/~inkscape.dev/inkscape/RELEASE_0_91_BRANCH/revision/13797

Revision history for this message
Mc (mc...) wrote :

Cannot reproduce the described problem with the diff applied in 0.91.x r13825 either

jazzynico (jazzynico)
Changed in inkscape:
milestone: 0.91.1 → 0.92
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.