Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to import svg code into Inkscape

Tags:

html

svg

inkscape

is it possible to import code into Inkscape and save it as a .svg file?

i want to important this code and save it as a svg file:

<svg class="defs-only" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">

<symbol id="wave">    
<svg viewBox="0 0 100 50" preserveAspectRatio="none" >
    <g>
    <path d="M100,30 Q70,40 50,30 T0,30 v20 h100Z" 
          style="stroke-linejoin:round; stroke:#f6f6f6" stroke-width="0"/>
    </g>
</svg>
</symbol>
</svg>  
like image 772
Jack Maessen Avatar asked Feb 22 '18 14:02

Jack Maessen


1 Answers

In Inkscape there's xml text editor (Edit > XML editor...) panel. There you can follow these steps:

  • Create a new element, call it: svg:path (this will create it with an id)
  • click unindent node to have it as a child from the main node (top one). You may want to keep it under a particular node too.
  • On the right hand side fill the list of attributes, by setting the name on the box next to the set button, and the value in the box below. Once you've enter the values click Set. This may seem obvious, but it took me a while to figure it out.

A picture is worth a thousand words

There's more detailed information about the xml editor on Tavmjong Bah's Guide to a vector drawing program

like image 81
dvdgc13 Avatar answered Oct 18 '22 09:10

dvdgc13