Jump to content
andym

Preserve layer names when exporting to svg?

Recommended Posts

Hi 

 

I don't know if this is a question or a feature request. I'm working on a map for a website, and what I'd like to do is use CSS to control the fill colour for a particular region. So I want to tinker with the svg in a text editor. The only problem is the layer names aren't preserved when I export to svg. Am I missing something? Is there a way to preserve them?

Share this post


Link to post
Share on other sites

SVG's do not have layers. If you use Inkscape there is a basic layer tool, but these are grouped objects stacked above each other.

If you want to use layers in svg you should look at the 

<g>…</g>

enclosures (sorry for my lousy English: hope this makes sense).

Share this post


Link to post
Share on other sites

SVG's do not have layers. If you use Inkscape there is a basic layer tool, but these are grouped objects stacked above each other.

If you want to use layers in svg you should look at the 

<g>…</g>

enclosures (sorry for my lousy English: hope this makes sense).

 

Hi Eelco

 

Your English seems fine to me, I think I should have explained myself better.

 

What I have in the svg file is a series of paths

 

<g><path d="M564.55,581.71l-2.24,-0.73l0.82, [ .... ] -1.16l0.9,0l5.79,2.21l-0.23,1.58l0.01,-0.01Z" style="fill:none;stroke-width:2px;stroke:#000;"/>

 

i need to go through the file in a text editor and amend to 

 

<g><path id="[LayerName]" d="M564.55,581.71l-2.24,-0.73l0.82, [ .... ] -1.16l0.9,0l5.79,2.21l-0.23,1.58l0.01,-0.01Z" style="fill:none;stroke-width:2px;stroke:#000;"/> etc

 

Hopefully they're in the same order as in the original .affinitydesign file, but it would be great if Affinity Designer either did this as the default, or gave me the option of preserving the layer names. (Excuse me if I've got the terminology wrong and these are 'Curves' as opposed to 'Layers').

 

Also, I hope this is a related question. a couple of 'layers' have clip paths attached. I think one of these is a curve/layer that I've edited in AD and the other is a text layer I've created in AD:

 

<g clip-path="url(#tag1)"><g transform="matrix(0.404421,0,0,0.404421,258.434,283.616)"><text x="416.934px" y="459.965px" style="font-family:Helvetica Neue;font-size:37.5px;fill:#000;">Lazio</text></g>

 

I know the developers are working to get out the release version, but when they get round to doing the documentation it would be useful to know when AD creates clip-paths - so you can create them when you need them and not create them when you don't.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...

Important Information

Please note the Annual Company Closure section in the Terms of Use. These are the Terms of Use you will be asked to agree to if you join the forum. | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.