Inkscape Community

Help Using Inkscape => Beyond the Basics => Topic started by: pipfrosch on September 24, 2018, 03:40:29 PM

Title: command line --export-svg and pattern fill
Post by: pipfrosch on September 24, 2018, 03:40:29 PM
Hello,

Code: [Select]
inkscape input.svg --export-eps=output.eps

Usually that works beautifully for me, even does fonts right when the svg references fonts.

However it seems that when a path has a pattern fill, inkscape doesn't apply it. It does with rect but not with path.
Is there a fix? e.g. something I can do in the SVG that makes it easier for inkscape to add pattern on export?

The SVG is hand coded, not created by inkscape. Pattern fill shows when rendered by FireFox.
Title: Re: command line --export-svg and pattern fill
Post by: pipfrosch on September 24, 2018, 03:58:35 PM
To expand, here is the pattern definition:
Code: [Select]
<pattern id="squiggle" patternUnits="userSpaceOnUse" width="10" height="10" patternTransform="rotate(119)">
      <path fill="none" stroke="cyan" stroke-opacity="1" stroke-width="3" d="m 0,5 c 3.333333,4 6.666667,-4 10,0"/>
</pattern>

In FireFox that works as fill for both rect and path nodes but when exporting to eps via command-line only the rect nodes get the pattern applied.
Title: Re: command line --export-svg and pattern fill
Post by: pipfrosch on September 24, 2018, 05:19:44 PM
I wonder if it is related to this -

http://www.inkscapeforum.com/viewtopic.php?t=17887

My patterns are paths. However I don't see how it could be a render problem if the pattern works in rect nodes, just not in path nodes.
Title: Re: command line --export-svg and pattern fill
Post by: brynn on September 24, 2018, 07:15:06 PM
Oh gosh.  The reason I haven't answered this message is because I know little to nothing about using the commandline.  Well I mean, I guess that little bit of code you showed is the commands for the commandline?

Do I understand correctly that it seems to work only when you view it with Firefox?  That would give me the impression that it's working, that Inkscape is applying the pattern correctly, but that the problem is happening with whatever you're using the view the file.

Hmmm yes, the message you referenced seems to indicate the problem is related to the viewer as well.

As to why it works when a rectangle is used but not with a path, I don't know.

Or is this a problem with using the commandline?  If you do this with the gui, do you have the same problem?

Unfortunately, I can't seem to keep my eyes propped open tonight.  But I'll be back tomorrow, and be ready to try testing using the gui.  Or otherwise at least I'll be able to think a bit more clearly.
Title: Re: command line --export-svg and pattern fill
Post by: pipfrosch on September 24, 2018, 07:52:59 PM
Okay I changed the pattern to a filled path with no stroke - actually looked better in firefox, but still no joy.

Opened the actual EPS file in Atril document viewer - and it's weird.

One pattern that doesn't work when embedding eps via latex does show but is mutilated. The other pattern doesn't show.

So I'm guessing it has to do with SVG patterns not being easily translated into something postscript can deal with. Gah.
Title: Re: command line --export-svg and pattern fill
Post by: pipfrosch on September 24, 2018, 07:58:55 PM
Inkscape export to PDF seems to work - when viewed in chromium but not when viewed in in evince.

So yes it's a render problem.
Title: Re: command line --export-svg and pattern fill
Post by: pipfrosch on September 24, 2018, 08:10:21 PM
Okay using pdf image instead of eps in the latex works w/ inkscape exporting to PDF even in evince displaying the latex generated PDF.
Title: Re: command line --export-svg and pattern fill
Post by: brynn on September 25, 2018, 10:21:38 PM
So that solution works for you?

Sorry, I wish I could have been more help.