Cairo rendering broken for "use" elements with scaling or a viewBox
| Affects | Status | Importance | Assigned to | Milestone | |
|---|---|---|---|---|---|
| Inkscape |
Fix Released
|
Medium
|
theAdib | ||
| inkscape (Debian) |
Fix Released
|
Unknown
|
|||
| inkscape (Ubuntu) |
Fix Released
|
Low
|
Unassigned | ||
Bug Description
Forwarded from http://
Reported by: Erich Schubert <email address hidden>
Date: Thu, 3 Dec 2009 17:36:02 UTC
Severity: normal
Found in version inkscape/0.47pre4-1
It seems as if Cairo output (e.g. export to PDF, print preview, print probably)
does not honor "width" and "height" attributes of "use" elements, or the viewBox attribute of the symbol definition.
Attached is a test SVG file that shows correctly within inkscape, but is messed up in print preview.
I also attached a screenshot for reference of the result. As you can, see, the scaling information of the filled circles (which are inserted using 'use') is lost.
In addition, the yellow discs are offset by their view box origin. I did not use view box sizing for extra scaling, which would probably introduce a third layer of mess-up.
This is probably upstream.
I believe it was okay in earlier version of inkscape that used less Cairo for output?
--- System information. ---
Architecture: amd64
Kernel: Linux 2.6.31-1-amd64
Debian Release: squeeze/sid
500 unstable www.debian-
500 unstable debmirror.lrz.de
500 stable dl.google.com
1 experimental debmirror.lrz.de
--- Package information. ---
Depends (Version) | Installed
=======
libatk1.0-0 (>= 1.20.0) | 1.29.3-1
libc6 (>= 2.4) | 2.10.2-2
libcairo2 (>= 1.7.2) | 1.8.8-2
libcairomm-1.0-1 (>= 1.6.4) | 1.8.0-1
libfontconfig1 (>= 2.4.0) | 2.6.0-4
libfreetype6 (>= 2.2.1) | 2.3.11-1
libgc1c2 (>= 1:6.8-1.1) | 1:6.8-1.2
libgcc1 (>= 1:4.1.1) | 1:4.4.2-3
libgconf2-4 (>= 2.27.0) | 2.28.0-1
libglib2.0-0 (>= 2.16.0) | 2.23.0-1
libglibmm-2.4-1c2a (>= 2.22.0) | 2.22.1-2
libgnomevfs2-0 (>= 1:2.17.90) | 1:2.24.2-1
libgomp1 (>= 4.2.1) | 4.4.2-3
libgsl0ldbl (>= 1.9) | 1.13+dfsg-1
libgtk2.0-0 (>= 2.14.0) | 2.19.1-1
libgtkmm-2.4-1c2a (>= 1:2.18.0) | 1:2.18.2-1
libgtkspell0 (>= 2.0.10) | 2.0.13-2
liblcms1 (>= 1.15-1) | 1.18.dfsg-1
libmagick++2 (>= 7:6.5.7.8) | 7:6.5.7.8-1
libmagickcore2 (>= 7:6.5.7.8) | 7:6.5.7.8-1
libpango1.0-0 (>= 1.14.0) | 1.26.1-1
libpangomm-1.4-1 (>= 2.26.0) | 2.26.0-1
libpng12-0 (>= 1.2.13-4) | 1.2.40-1
libpoppler-glib4 (>= 0.12) | 0.12.2-2
libpoppler5 | 0.12.2-2
libpopt0 (>= 1.15) | 1.15-1
libsigc++-2.0-0c2a (>= 2.0.2) | 2.2.2-1
libstdc++6 (>= 4.2.1) | 4.4.2-3
libwpd8c2a | 0.8.14-1
libwpg-0.1-1 | 0.1.3-1
libx11-6 | 2:1.3.2-1
libxml2 (>= 2.7.4) | 2.7.6.dfsg-1
libxslt1.1 (>= 1.1.18) | 1.1.26-1
zlib1g (>= 1:1.1.4) | 1:1.2.3.3.dfsg-15
Recommends (Version) | Installed
=======
libwmf-bin | 0.2.8.4-6.1
pstoedit | 3.45-8
imagemagick | 7:6.5.7.8-1
perlmagick |
Suggests (Version) | Installed
=======
dia |
OR dia-gnome | 0.97-2
ruby | 4.2
libgnomevfs2-extra | 1:2.24.2-1
libsvg-perl |
libxml-xql-perl |
python | 2.5.4-3
python-numpy | 1:1.3.0-3
python-lxml | 2.2.2-2
python-uniconvertor |
skencil |
ttf-bitstream-vera |
Related branches
- Bryce Harrington: Approve (packaging)
- Ubuntu branches: Pending requested
-
Diff: 99212 lines (+46210/-23783) 335 files modifiedapiInfo.plist (+3/-3)
Makefile.in (+4/-0)
aclocal.m4 (+8/-6)
build.xml (+6/-2)
config.guess (+120/-105)
config.h.in (+6/-0)
config.sub (+101/-55)
configure (+565/-356)
configure.ac (+33/-5)
debian/changelog (+22/-0)
debian/patches/00list (+0/-5)
debian/patches/01-libwpg0.2.dpatch (+0/-99)
debian/patches/03-add-missing-mimetypes.dpatch (+0/-20)
debian/patches/04-fix-build-with-gcc4.6.dpatch (+0/-18)
debian/patches/05-add-missing-includes.dpatch (+0/-799)
debian/patches/fix-fontforge-glyph-template.dpatch (+0/-82)
doc/Makefile.am (+2/-6)
doc/Makefile.in (+6/-6)
doc/keys-html.xsl (+0/-208)
doc/keys-svg.xsl (+0/-1315)
doc/keys.README (+3/-26)
doc/keys.de.xml (+0/-1107)
doc/keys.en.html (+8794/-0)
doc/keys.fr.html (+8787/-1110)
doc/keys.fr.xml (+0/-1135)
doc/keys.html (+0/-1415)
doc/keys.ja.html (+8787/-0)
doc/keys.xml (+0/-1429)
inkscape.1 (+3/-3)
inkscape.desktop.in (+1/-1)
inkscape.fr.1 (+3/-3)
inkscape.spec (+1/-1)
po/br.po (+13/-13)
po/fa.po (+2096/-2460)
po/gl.po (+1956/-653)
po/id.po (+2398/-1401)
po/ja.po (+6508/-5750)
po/nl.po (+2/-2)
share/Makefile.in (+4/-0)
share/clipart/Makefile.in (+4/-0)
share/examples/Makefile.in (+4/-0)
share/extensions/Barcode/Makefile.in (+4/-0)
share/extensions/Makefile.in (+4/-0)
share/extensions/Poly3DObjects/Makefile.in (+4/-0)
share/extensions/alphabet_soup/Makefile.in (+4/-0)
share/extensions/dxf_input.py (+87/-28)
share/extensions/dxf_outlines.py (+36/-20)
share/extensions/funcplot.py (+8/-4)
share/extensions/interp.py (+4/-1)
share/extensions/polyhedron_3d.inx (+2/-2)
share/extensions/restack.py (+25/-17)
share/extensions/svg2xaml.xsl (+2125/-659)
share/extensions/test/Makefile.in (+4/-0)
share/extensions/xaml2svg/Makefile.in (+4/-0)
share/filters/Makefile.in (+4/-0)
share/filters/filters.svg (+2/-2)
share/fonts/Makefile.in (+4/-0)
share/gradients/Makefile.in (+4/-0)
share/icons/Makefile.in (+4/-0)
share/icons/application/16x16/Makefile.in (+4/-0)
share/icons/application/22x22/Makefile.in (+4/-0)
share/icons/application/24x24/Makefile.in (+4/-0)
share/icons/application/256x256/Makefile.in (+4/-0)
share/icons/application/32x32/Makefile.in (+4/-0)
share/icons/application/48x48/Makefile.in (+4/-0)
share/icons/application/Makefile.in (+4/-0)
share/keys/Makefile.in (+4/-0)
share/markers/Makefile.in (+4/-0)
share/palettes/Makefile.in (+4/-0)
share/patterns/Makefile.in (+4/-0)
share/screens/Makefile.in (+4/-0)
share/templates/Makefile.in (+4/-0)
share/templates/fontforge_glyph.svg (+22/-26)
share/tutorials/Makefile.in (+4/-0)
share/tutorials/tutorial-advanced.ja.svg (+235/-251)
share/tutorials/tutorial-basic.ja.svg (+305/-320)
share/tutorials/tutorial-calligraphy.ja.svg (+427/-443)
share/tutorials/tutorial-elements.ja.svg (+242/-257)
share/tutorials/tutorial-elements.sk.svg (+198/-214)
share/tutorials/tutorial-shapes.ja.svg (+495/-510)
share/tutorials/tutorial-shapes.sk.svg (+446/-462)
share/tutorials/tutorial-tips.ja.svg (+351/-367)
share/tutorials/tutorial-tracing.ja.svg (+105/-120)
share/ui/Makefile.in (+4/-0)
src/2geom/convex-cover.cpp (+1/-1)
src/2geom/utils.h (+1/-0)
src/Makefile.am (+4/-0)
src/Makefile.in (+26/-19)
src/Makefile_insert (+1/-0)
src/arc-context.h (+1/-0)
src/box3d-context.h (+1/-0)
src/color-profile.cpp (+1/-1)
src/color.h (+1/-1)
src/conn-avoid-ref.cpp (+1/-0)
src/conn-avoid-ref.h (+1/-0)
src/connection-pool.h (+1/-0)
src/connector-context.h (+1/-0)
src/context-fns.h (+1/-1)
src/debug/gdk-event-latency-tracker.h (+1/-1)
src/debug/log-display-config.cpp (+1/-2)
src/desktop-events.h (+2/-2)
src/desktop-style.cpp (+1/-1)
src/desktop.h (+3/-2)
src/device-manager.cpp (+1/-1)
src/dialogs/clonetiler.h (+1/-1)
src/dialogs/dialog-events.h (+1/-2)
src/dialogs/find.h (+1/-1)
src/dialogs/item-properties.cpp (+0/-9)
src/dialogs/item-properties.h (+1/-1)
src/dialogs/object-attributes.cpp (+1/-0)
src/dialogs/object-attributes.h (+1/-1)
src/dialogs/spellcheck.h (+1/-1)
src/display/canvas-arena.cpp (+1/-1)
src/display/canvas-temporary-item.cpp (+1/-1)
src/display/canvas-temporary-item.h (+1/-0)
src/display/nr-3dutils.h (+1/-1)
src/display/nr-arena-glyphs.cpp (+1/-0)
src/display/nr-arena-glyphs.h (+1/-1)
src/display/nr-arena.cpp (+1/-0)
src/display/nr-arena.h (+2/-1)
src/display/nr-filter-diffuselighting.h (+1/-1)
src/display/nr-filter-specularlighting.h (+1/-1)
src/display/nr-light.h (+1/-1)
src/display/sodipodi-ctrl.h (+2/-2)
src/display/sp-canvas.cpp (+1/-3)
src/display/sp-canvas.h (+2/-4)
src/document-private.h (+1/-0)
src/document-subset.h (+1/-0)
src/document.cpp (+1/-1)
src/document.h (+2/-1)
src/draw-context.h (+1/-0)
src/ege-adjustment-action.cpp (+0/-13)
src/ege-adjustment-action.h (+1/-1)
src/ege-color-prof-tracker.cpp (+1/-3)
src/ege-output-action.cpp (+1/-3)
src/ege-output-action.h (+1/-1)
src/ege-select-one-action.cpp (+0/-9)
src/ege-select-one-action.h (+1/-2)
src/event-context.cpp (+1/-2)
src/event-context.h (+1/-2)
src/extension/effect.h (+1/-1)
src/extension/implementation/implementation.h (+1/-1)
src/extension/input.h (+1/-1)
src/extension/internal/cairo-render-context.cpp (+6/-3)
src/extension/internal/cairo-renderer-pdf-out.cpp (+7/-4)
src/extension/internal/cairo-renderer.cpp (+10/-8)
src/extension/internal/emf-win32-inout.cpp (+178/-53)
src/extension/internal/emf-win32-print.cpp (+2/-4)
src/extension/internal/latex-text-renderer.cpp (+23/-17)
src/extension/internal/pdfinput/pdf-input.cpp (+1/-1)
src/extension/internal/wpg-input.cpp (+21/-1)
src/extension/output.h (+1/-1)
src/extension/timer.h (+1/-0)
src/file.cpp (+1/-1)
src/file.h (+1/-1)
src/flood-context.h (+1/-0)
src/forward.h (+0/-3)
src/gc-alloc.h (+1/-0)
src/gc-finalized.h (+1/-0)
src/gc.cpp (+1/-0)
src/gradient-context.h (+1/-0)
src/gradient-drag.h (+1/-0)
src/help.h (+1/-1)
src/helper/sp-marshal.cpp (+2/-0)
src/helper/unit-menu.cpp (+1/-4)
src/helper/unit-menu.h (+1/-1)
src/helper/unit-tracker.cpp (+1/-1)
src/helper/unit-tracker.h (+1/-2)
src/helper/window.cpp (+1/-1)
src/helper/window.h (+1/-1)
src/icon-size.h (+1/-1)
src/id-clash.cpp (+1/-0)
src/ink-action.cpp (+2/-7)
src/ink-action.h (+1/-3)
src/ink-comboboxentry-action.cpp (+0/-3)
src/ink-comboboxentry-action.h (+1/-2)
src/inkscape-version.cpp (+1/-1)
src/inkscape.cpp (+2/-3)
src/inkview.cpp (+1/-5)
src/interface.h (+1/-1)
src/io/sys.cpp (+1/-1)
src/knot.h (+2/-1)
src/libavoid/geomtypes.h (+1/-0)
src/libavoid/orthogonal.cpp (+1/-1)
src/libgdl/gdl-dock-bar.h (+1/-1)
src/libgdl/gdl-dock-item-grip.c (+1/-3)
src/libgdl/gdl-dock-item-grip.h (+1/-1)
src/libgdl/gdl-dock-master.h (+1/-1)
src/libgdl/gdl-dock-object.h (+1/-1)
src/libgdl/gdl-dock-paned.c (+1/-2)
src/libgdl/gdl-stock.c (+0/-1)
src/libgdl/gdl-switcher.c (+0/-4)
src/libgdl/gdl-switcher.h (+1/-1)
src/libgdl/gdl-tools.h (+1/-1)
src/libnrtype/Layout-TNG-Input.cpp (+1/-1)
src/live_effects/lpeobject-reference.h (+1/-0)
src/live_effects/parameter/path-reference.h (+1/-0)
src/live_effects/parameter/path.cpp (+1/-1)
src/live_effects/parameter/path.h (+1/-0)
src/main.cpp (+2/-6)
src/message-stack.h (+1/-0)
src/modifier-fns.h (+1/-1)
src/object-hierarchy.h (+1/-0)
src/persp3d-reference.h (+1/-0)
src/rect-context.h (+1/-0)
src/selcue.h (+1/-0)
src/select-context.h (+1/-1)
src/selection-describer.h (+1/-0)
src/selection.h (+1/-0)
src/seltrans-handles.h (+1/-0)
src/seltrans.h (+1/-0)
src/shortcuts.cpp (+1/-1)
src/sp-conn-end-pair.cpp (+1/-1)
src/sp-conn-end-pair.h (+1/-0)
src/sp-conn-end.h (+1/-0)
src/sp-gradient.cpp (+5/-5)
src/sp-gradient.h (+2/-1)
src/sp-image.cpp (+1/-1)
src/sp-object.cpp (+1/-0)
src/sp-object.h (+1/-0)
src/sp-offset.h (+1/-0)
src/sp-paint-server-reference.h (+43/-0)
src/sp-paint-server.cpp (+18/-5)
src/sp-paint-server.h (+4/-19)
src/sp-pattern.cpp (+6/-9)
src/sp-pattern.h (+2/-1)
src/sp-shape.cpp (+7/-6)
src/sp-shape.h (+1/-0)
src/sp-switch.h (+1/-0)
src/sp-text.h (+1/-0)
src/sp-tref-reference.h (+1/-0)
src/sp-use-reference.h (+1/-0)
src/sp-use.h (+1/-0)
src/spiral-context.h (+2/-1)
src/splivarot.cpp (+20/-15)
src/star-context.h (+1/-0)
src/style.h (+2/-1)
src/svg-view-widget.cpp (+1/-1)
src/text-context.cpp (+1/-2)
src/text-context.h (+2/-2)
src/ui/context-menu.cpp (+1/-1)
src/ui/context-menu.h (+1/-1)
src/ui/dialog/aboutbox.cpp (+2/-1)
src/ui/dialog/color-item.cpp (+1/-1)
src/ui/dialog/desktop-tracker.h (+1/-0)
src/ui/dialog/document-metadata.h (+1/-0)
src/ui/dialog/document-properties.h (+1/-0)
src/ui/dialog/extensions.cpp (+1/-1)
src/ui/dialog/filedialogimpl-gtkmm.h (+1/-5)
src/ui/dialog/filedialogimpl-win32.cpp (+11/-0)
src/ui/dialog/glyphs.cpp (+1/-3)
src/ui/dialog/inkscape-preferences.cpp (+1/-1)
src/ui/dialog/inkscape-preferences.h (+1/-0)
src/ui/dialog/layers.cpp (+1/-2)
src/ui/dialog/ocaldialogs.cpp (+1/-1)
src/ui/dialog/ocaldialogs.h (+1/-3)
src/ui/dialog/print.h (+1/-1)
src/ui/dialog/svg-fonts-dialog.cpp (+4/-1)
src/ui/dialog/swatches.cpp (+87/-8)
src/ui/dialog/swatches.h (+3/-0)
src/ui/dialog/tile.cpp (+1/-2)
src/ui/dialog/tracedialog.cpp (+1/-1)
src/ui/dialog/undo-history.cpp (+2/-1)
src/ui/tool/control-point-selection.h (+1/-0)
src/ui/tool/control-point.h (+1/-0)
src/ui/tool/manipulator.h (+1/-0)
src/ui/tool/multi-path-manipulator.h (+1/-0)
src/ui/tool/node-tool.h (+1/-0)
src/ui/tool/node.h (+1/-0)
src/ui/view/edit-widget.cpp (+1/-3)
src/ui/view/view-widget.h (+1/-1)
src/ui/view/view.h (+2/-1)
src/ui/widget/color-picker.h (+1/-0)
src/ui/widget/combo-text.cpp (+1/-1)
src/ui/widget/layer-selector.cpp (+4/-0)
src/ui/widget/page-sizer.cpp (+17/-13)
src/ui/widget/page-sizer.h (+2/-0)
src/ui/widget/panel.cpp (+1/-1)
src/ui/widget/preferences-widget.h (+1/-0)
src/ui/widget/selected-style.cpp (+1/-1)
src/ui/widget/selected-style.h (+1/-0)
src/ui/widget/style-subject.h (+1/-0)
src/ui/widget/toolbox.cpp (+1/-1)
src/uri-references.h (+1/-0)
src/util/forward-pointer-iterator.h (+1/-0)
src/util/share.h (+1/-0)
src/util/unordered-containers.h (+2/-0)
src/verbs.cpp (+1/-1)
src/widgets/button.cpp (+1/-0)
src/widgets/button.h (+1/-3)
src/widgets/desktop-widget.cpp (+1/-1)
src/widgets/desktop-widget.h (+2/-2)
src/widgets/eek-preview.h (+2/-2)
src/widgets/fill-style.cpp (+1/-1)
src/widgets/font-selector.cpp (+0/-7)
src/widgets/font-selector.h (+1/-1)
src/widgets/gradient-image.h (+2/-1)
src/widgets/gradient-selector.cpp (+1/-5)
src/widgets/gradient-selector.h (+1/-1)
src/widgets/gradient-toolbar.h (+1/-1)
src/widgets/gradient-vector.h (+2/-1)
src/widgets/icon.h (+1/-1)
src/widgets/paint-selector.cpp (+1/-8)
src/widgets/paint-selector.h (+1/-1)
src/widgets/ruler.h (+1/-1)
src/widgets/select-toolbar.cpp (+0/-1)
src/widgets/select-toolbar.h (+1/-2)
src/widgets/shrink-wrap-button.cpp (+1/-1)
src/widgets/sp-attribute-widget.cpp (+1/-2)
src/widgets/sp-attribute-widget.h (+2/-2)
src/widgets/sp-color-gtkselector.h (+1/-1)
src/widgets/sp-color-icc-selector.cpp (+0/-6)
src/widgets/sp-color-icc-selector.h (+1/-2)
src/widgets/sp-color-notebook.cpp (+1/-0)
src/widgets/sp-color-notebook.h (+1/-3)
src/widgets/sp-color-preview.h (+1/-1)
src/widgets/sp-color-scales.h (+1/-2)
src/widgets/sp-color-selector.cpp (+1/-1)
src/widgets/sp-color-selector.h (+1/-1)
src/widgets/sp-color-slider.cpp (+1/-2)
src/widgets/sp-color-slider.h (+1/-1)
src/widgets/sp-color-wheel-selector.cpp (+1/-4)
src/widgets/sp-color-wheel-selector.h (+1/-2)
src/widgets/sp-color-wheel.cpp (+1/-1)
src/widgets/sp-color-wheel.h (+1/-1)
src/widgets/sp-widget.h (+1/-1)
src/widgets/sp-xmlview-attr-list.h (+0/-1)
src/widgets/sp-xmlview-content.h (+1/-1)
src/widgets/sp-xmlview-tree.h (+1/-1)
src/widgets/spinbutton-events.cpp (+1/-0)
src/widgets/spinbutton-events.h (+1/-2)
src/widgets/spw-utilities.h (+2/-1)
src/widgets/toolbox.cpp (+4/-2)
src/widgets/toolbox.h (+1/-2)
src/xml/helper-observer.h (+1/-0)
Confirmed in Ubuntu in 0.48.0-1ubuntu2 (dodgy PDF export attached)
Similar to bug #320646 "export via cairo -> shifted image" ?
From 'test.svg':
<defs>
<symbol id="s1" viewBox="0 0 .5 .5">
<circle r="0.25" style="
</symbol>
<symbol id="s2" viewBox="-.25 -.25 .5 .5">
<circle r="0.25" style="
</symbol>
</defs>
More likely a duplicate of
Bug #436962 "<symbol> not rendered correctly in exported PDF"
<https:/
Another possibly related/duplicate report:
Bug #485846 "imported svg not exportable to eps"
<https:/
- 705345-test-2-rsvg.pdf Edit (1.5 KiB, application/pdf)
Test file ('test.svg') converted to PDF with librsvg 2.34 looks ok:
$ rsvg-convert 705345-test.svg -f pdf -o 705345-
If it works, I approve for 0.48.2.
Fix in r10197 confirmed with from bug #705345 and bug #485846:
<https:/
<https:/
With the sample file from bug #436962:
<https:/
The symbol definitions themselves are no longer exported (compared to PDF exported with r10196 with 4 red circles there are only two red circles in r10197). The remaining issue of bug #436962 - both red circles are still rendered filled (instead of showing a white fill in the cut-out area) - seems unrelated to the <symbol> problem because the cairo-based export apparently ignores the fill rule which is set on a parent group instead of the red path itself (which isn't an instantiated symbol (<use> element) btw).
I can confirm it too. In my files the symbols are now exported correctly.
Backported to the branch, revision 9810.
This bug was fixed in the package inkscape - 0.48.2-0ubuntu1
---------------
inkscape (0.48.2-0ubuntu1) oneiric; urgency=low
* New upstream release (LP: #807912). Fixes several Ubuntu bugs:
- [SVG Font Editor] Crash when kerning an empty pair (LP: #706506)
- Connector tool crash Inkscake (orthogonal mode) (LP: #771738)
- Errors printed to console if openclipart search fails (LP: #638844)
- pdf export with cairo 1.10 defaults to version PDF-1.5 (LP: #664335)
- Cairo rendering broken for "use" elements when scaling or a viewBox
(LP: #705345)
- gimp_xcf.py crashed with TypeError in effect() (LP: #565296)
- Enable build against libwpg-0.2 (LP: #778951)
- Please add supported filetypes into MimeType line of inkscape.desktop
(LP: #278307)
- Inkscape fails to build with gcc 4.6 (LP: #707205)
* Drop 01-libwpg0.2.dpatch - Applied upstream
* Drop 03-add-
* Drop 04-fix-
* Drop 05-add-
* Drop fix-fontforge-
-- Alex Valavanis <email address hidden> 2011年7月10日 11:35:30 +0100