www
clone your own copy | download snapshot

Snapshots | iceberg

Inside this repository

inkscape-plugins-in-python.md
text/plain

Download raw (1.2 KB)

Title: Inkscape plugins in Python
Date: 2008-02-17 22:39
Author: Michael
Category: Tools
Tags: Inkscape, Scripting, SVG
Slug: inkscape-plugins-in-python
Status: published

[![circles.png](http://ospublish.constantvzw.org/blog/wp-content/uploads/circles.thumbnail.png)](http://ospublish.constantvzw.org/blog/wp-content/uploads/circles.png "circles.png")[](http://ospublish.constantvzw.org/blog/wp-content/uploads/circles.zip "circles.zip")

Inkscape allows python scripts to be used as effects plugins. In a
nutshell: you use the [DOM](http://developer.mozilla.org/en/docs/DOM) to
create / manipulate the structure of the SVG document and use CSS
properties to style -- so there's quite some overlap with "regular" CGI
& web programming.

This example (circles) is based on the example given on the [Inkscape
wiki](http://wiki.inkscape.org/wiki/index.php/PythonEffectTutorial). I
started by making a simple Inkscape file (with a single circle), saving
the file, then opened it in a text editor to view the "raw" XML
structure of the SVG. I used this as a guide for what the code needed to
produce.

[circles.zip](http://ospublish.constantvzw.org/blog/wp-content/uploads/circles.zip "circles.zip")