GNOME Bugzilla – Bug 328165
Patch for better svg image support
Last modified: 2019-03-20 11:22:49 UTC
While my svg shape effort is not succeeded yet. I have created a useful patch. Currently svg image support can be done via librsvg gdkpixbuf loader. This way is not so good because when you scale an image, it scales as if it's a raster image, not a vector image. This patch uses librsvg directly so that you can scale your images as you wish without losing accuracy. I didn't patch configure.in (not familiar with that). It should define HAVE_LIBRSVG to enable this patch.
Created attachment 57846 [details] [review] dia_image.c patch
As noted in bug #142783 I think the current svg:image via adapts the pixbuf size to the current size of required bitmap. I fail to see how this patch is in any way different to that approach.
Sorry i didn't make it clear. I meant the image tool in objects/standard/image.c, not svg:image.
Makes not differnce for me ;) Both facilities are using DiaImage from lib/dia_image.c. And I've just tested with an SVG via filename in Properrties : Standard - Image The reolution of the rendered image is perfectly adapted to the used resolution.
Created attachment 57860 [details] Screenshot comparison As you see, there are two trashes. The uglier is of course HEAD without patch ;)
Now I see. All SVG I've tested had a reasonable default size so I didn't notice the pixels before. That's the workaround I'd propose for the upcoming version instead of increasing the #ifdef mess ;) What I'm wondering is how you are testing the thing without a configure.in patch. Or is HAVE_LIBRSVG defined when building --with-gnome?
Actually i have patched configure.in but as a mandatory depdendency (together with other gtk depdendencies) and defined HAVE_LIBRSVG myself. Even if i didn't patch configure.in, i could modify some variables in Makefile. Dirty but works :)
-- GitLab Migration Automatic Message -- This bug has been migrated to GNOME's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/dia/issues/155.