Extension architecture proposals

From Inkscape Wiki
Jump to navigation Jump to search

The Inkscape Wiki is no longer used to host information about Extension architecture.

You can now find related information at GitLab.

This page is kept for historical reasons, e.g. to document specific decisions in Inkscape development.

Please place your extension architecture proposals here. Everyone will review them and we will decided a course of action after we release 0.38.


Design Phase:

  • Flesh out each category of functions in the API with ideas for what the functions should be
  • Solidify the underlying Extension infrastructure [Ted]
  • Create an example Extension package
  • Write a specification document, including:
    • Overview of Inkscape Extensions
    • Creating an Extension
    • Registering an Extension
    • Custom Extension Preferences
    • Extension API Definition

Implementation Phase:

  • Implement Extension API
  • Implement an Extension registry
  • Create Extension preferences dialog
  • Create web tool for contributing new Extensions


We would like the extension system to provide the following capabilities:

  • Uses a general language binding system so it's easy to add new language binding support
  • Allows direct interaction with the document object model including changing styles, adding/removing defs and elements, etc.
  • Allows some limited interaction with the Inkscape UI such as manipulating grids, overlays, etc.
  • Allows direct interaction with file load/save/export/print subsystem
  • Guaranteed to work properly with the undo system, even if the extension is not written carefully
  • Well documented so is easy for people to learn how to make new extensions
  • Each plugin can be implemented, distributed, and managed independently of the core project
  • Should be easy to start learning how to create new plugins
  • Icons, buttons, and other UI elements for plugins fit seamlessly into main application GUI
  • User can easily select which plugins to automatically load into application at startup
  • Loading of plugins shall not seriously slow startup time or make a major impact on memory footprint
  • Failure of a plugin shall not leave the drawing in an inconsistent state
  • Main application must gracefully recover from plugin crashes or other serious problems with plugin execution
  • Dependencies for particular plugins must be clearly identified for user if missing

Extension ideas

  • Plugin to send image to sign making peripherals like the Graphtec or Summa vinyl cutters' and printers'. Adobe Illustrator has such a thing so why not Insckape too?:)
  • Cross stitch generator (http://hawthorn.csse.monash.edu.au/~njh/programming/cross-stitch/)
  • Celtic knot editor: Using the standard winding number algorithm for Celtic knots build an interactive editor that forms the basic structure of the knots, allowing the user to edit the curve once generated. (Possible issue - getting the over/under rules correct) Douglas Zongker's Celtic Knot Thingy is a possible resource: http://isotropic.org/uw/knot/
  • mail-merge
  • Integrate a capture of a Blender3D frame and then process that bitmap. From a Blender-viewer window? From a simpler viewer? Not from a screen capture...higher resolution is desired...
  • Socket connection to other apps instead of file-based, where the state of socket connections will be autosaved and restorable after a crash...(since such on the fly work may not be easy to recreate then)
  • 3-d rotate - this is a really cool Kai (Kai's Vector Tools/Effects) plug-in for Illustrator
  • Inkify - it would be cool to have a plug-in that would take a normal object and make it look like it was drawn with ink.
  • Copy Adobe Illustrator's filters (punkify, bloat, calligraphize, etc)
  • Copy Dia's plugins
  • Look at Karbon14's plugins
  • PDF and Postscript import that converts all the type into lines as well as the included postscript vector objects and bitmaps
  • Randomize Size and Rotation of Objects
  • Create Cluster of objects from one seed with variable quantity, random distribution (noise types, gaussian, etc), variable rotation, opacity, and size
  • Zoom effect on shapes. Create an option where a zoom-like effect can be applied to a shape or set of shapes where more shapes are made larger and larger from the central anchor point of the shape(s) passed to this plugin
  • Color effects: Invert, Desaturate, etc. http://gimp-savvy.com/BOOK/index.html?node54.html

Existing extensions not bundled with Inkscape

  • Trace Setup, prepares a document for tracing a bitmap image
  • textext, re-editable LaTeX objects in Inkscape
  • InkLaTeX, simple drawing LaTeX text on Inkscape
  • animEasy, easy 2D animations

Inkscape Extension Archive Network

Initially, distributing extensions with Inkscape itself will be okay but ultimately for them to truly be extensions they should exist external to the core Inkscape project, which means we need some way to receive and manage contributions. Perl's CPAN provides an excellent model for how this type of module-contribution system can be made to work. Some important characteristics of CPAN worth adopting here:

  * Indexes of best items are available (e.g. 'best of')
  * Redundant modules are tolerated
  * Automate testing of included test suites on various platforms
  * Naming requirements to be included in indexes
  * Removal of malicious items
  * Manual application for user id on the system
  * Documentation for each module is online and nicely formatted
  * Integrated bug tracking system
  * Need to divide 'development' and 'stable'
  * Need to identify poor style, over-complexity.
  * Feedback to author should be personal so avoids public ranting
  * Use of review forms instead of freeform feedback?
  * Use of per-module discussion forums?
  * Establish forum for thanks and positive feedback
  * Like freshmeat/sourceforge, report on # downloads, vitality, etc.

Extension Architechture Feature Wishlist

  • View stderr for external processes on failure (DONE)
  • Report reason (what deps are missing) for being disabled on attempted use
  • multiline text input widget
  • enumerated values input widget (dropdownlistbox) (would make effects more self documenting in some cases)
  • mutually exclusive parameter groups (tabbed notebooks)
  • multiline text label for use instructions
  • consider extension API rework. Current problems: possible perfomance issues because file IO and full document parsing at extension end. Also, access to internal inkscape functions is limited to invoking another copy of inkscape, wich leads again to long execution times and lack of flexibility. Proposed change: two-way communication via stdin/stdout in XML protocol, wich must allow partial document modification and allow access to inkscape internal functions, such as bounding box calculation, bezier curves subdivision, etc.

See Also