Quantcast
Channel: GIMP Plugin Registry - 2.0
Viewing all articles
Browse latest Browse all 15

SVG Export

$
0
0

Extends the functionality of /Export Path by allowing for the specification of attribute values (fill,stroke,etc) by encoding these into the path name.
Export path values as SVG file. Script assumes that the path name is an encoding of SVG attributes.

These are encoded using:

_[2 letter code][value]_ where 2 letter code is one of:

  • fc => fill color (SVG attribute: fill)
  • fo => fill opacity (SVG attribute: fill-opacity)
  • nm => name of the path (SVG attribute: id)
  • sc => stroke color (SVG attribute: stroke)
  • sj => stroke line join (SVG attribute: stroke-linejoin)
  • sl => stroke line cap (SVG attribute: stroke-linecap)
  • so => stroke opacity (SVG attribute: stroke-opacity)
  • sw => stroke width (SVG attribute: stroke-width)
  • tp => type of shape can be: circle,rect,polyline,polygon

The value can not contain an underscore and exact values for attributes can be obtained
from the SVG Specifications: http://www.w3.org/TR/SVG

For example:

_fcwhite_scblack_tppolyline_slbutt_sjmiter_nmexample_



would decode to:


<polyline points="..." fill="white" stroke="black"
stroke-linejoin="miter" stroke-linecap="butt"
id="example"/>

Loading the resultant SVG file is only possible if you have SVG support
compiled in, but you can export SVG using this script.

AttachmentSize
example-xcf.zip14.47 KB
svg-path-export.scm21.47 KB
GIMP Version: 
Code License: 

Viewing all articles
Browse latest Browse all 15

Trending Articles