Issue with rendering of Inkscape SVG on browsers

This is NOT a support forum. You are welcome to discuss software issues here, but all issues should be reported on Launchpad if you want them fixed.
galinette
Posts: 3
Joined: Mon Oct 10, 2016 7:51 am

Issue with rendering of Inkscape SVG on browsers

Postby galinette » Mon Oct 10, 2016 8:04 am

Dear all,

I have a simple drawing (three stars, flat color fill) which use a linear gradient mask.

It was drawn on a 710x710px document, and the resulting SVG renders fine in browsers.

However, as soon as I scale the shape, it does not render properly in browsers. It looks like the mask gradient is not resized properly, despite everything looks fine in Inkscape.

Attached are three test files showing the issue. The first two (test128, test512) do not work properly, the last one (test710) works.

Did I do something wrong or is it an Inkscape bug? Browser bug?

Using Inkscape 0.91, Firefox 49.0.1, IE11

Thanks!
Attachments
test128.svg
(3.41 KiB) Downloaded 281 times
test512.svg
(3.44 KiB) Downloaded 299 times
test710.svg
(3.42 KiB) Downloaded 247 times

Lazur
Posts: 4717
Joined: Tue Jun 14, 2016 10:38 am

Re: Issue with rendering of Inkscape SVG on browsers

Postby Lazur » Mon Oct 10, 2016 8:43 am

Hi.

My guess would be it is a browser's bug.
Have you tried grouping the masked object (Ctrl+G) and resizing the group instead?
May worth a try.

hulf2012
Posts: 716
Joined: Sat Nov 24, 2012 12:37 pm

Re: Issue with rendering of Inkscape SVG on browsers

Postby hulf2012 » Mon Oct 10, 2016 1:24 pm

Hello
I think it's related that when you mask the group, the group have a transformation tag. I removed that tag
I'm not sure how to explain it better
Please see here, about grouping:
http://tutorials.jenkov.com/svg/svg-transformation.html

Also, about masking:
http://tutorials.jenkov.com/svg/mask.html

aaanyway...
I'm attaching one of your samples without group transformations and it renders Ok in Firefox.
- In Inkscape open the XML editor (ctrl + shift + X) to see the code.
- Or better, open the original svg file in a text editor, and compare it with the attached
Attachments
test512b.svg
(4.32 KiB) Downloaded 321 times
If you have problems:
1.- Post a sample (or samples) of your file please.
2.- Please check here:
http://tavmjong.free.fr/INKSCAPE/MANUAL/html/index.html
3.- If you manage to solve your problem, please post here your solution.

galinette
Posts: 3
Joined: Mon Oct 10, 2016 7:51 am

Re: Issue with rendering of Inkscape SVG on browsers

Postby galinette » Mon Oct 10, 2016 3:58 pm

Ok, thanks.

Lazur : the shape was actually already grouped and it seems this is what causes the issue.

hulf2012 : thanks, this fixes my issue, but what do you think regarding bug-tracking?

  • Is it an inkscape bug?
  • Is it a browser bug?
  • Is it a normal behavior?

I have no good knowledge of the SVG standard to answer this. Maybe in that case Inkscape is using a custom tag which is not in the SVG standard, and that should not be saved in "Plain SVG" format but converted to standard tags first?


SVG Image

galinette
Posts: 3
Joined: Mon Oct 10, 2016 7:51 am

Re: Issue with rendering of Inkscape SVG on browsers

Postby galinette » Mon Oct 10, 2016 6:33 pm

Ah, I have found another way to circumvent the issue, and a more precise explanation.

If I have :

Code: Select all

<g mask="mymask" transform="matrix(....)">
   <some-shapes.../>
</g>


Then inkscape applies the transform to the shape AND the mask, but browsers apply the transform to the shapes only.

But if I have:

Code: Select all

<g mask="mymask">
   <g transform="matrix(....)">
      <some-shapes.../>
   </g>
</g>


Then inkscape and browsers render it the same, and the same as Inkscape in the first case.

Which one is not SVG compliant?

Cheers,

Etienne

hulf2012
Posts: 716
Joined: Sat Nov 24, 2012 12:37 pm

Re: Issue with rendering of Inkscape SVG on browsers

Postby hulf2012 » Tue Oct 11, 2016 4:38 pm

It's a hard question

I suggest to present your case both In Inkscape developers mail list an /or Chrome or Firefox support.

Just as an opinion. Each team does its best when supporting SVG format. But It's like a normal human language (I mean spanish, english or chinese). At some moment, it's difficult to express an idea, or some phrases are misunderstood, etc.
If you have problems:
1.- Post a sample (or samples) of your file please.
2.- Please check here:
http://tavmjong.free.fr/INKSCAPE/MANUAL/html/index.html
3.- If you manage to solve your problem, please post here your solution.


Return to “Discuss Software Issues”