On Sat, May 20, 2006 at 10:28:44PM -0700, Ted Gould wrote:
On Thu, 2006-05-04 at 13:44 -0400, bulia byak wrote:
On 5/4/06, Tavmjong Bah <tavmjong@...8...> wrote:
- The release notes uses "Extensions" while the menu label in the GUI
is "Effects".
I'm still unsure of the right term. Please whoever cares about this, fix it!
I care greatly that you don't know the right term, let me work on fixing it :)
This is great info, Ted. I notice we also have an extensions document in inkscape/doc - would you mind taking a peek at that and making sure it jives with truth? I did a quick glance through and it appears to match up with this email.
Bryce
The Extension system is a way to add functionality to Inkscape. The design of the extension system follows the bridge design pattern, breaking apart the functionality that is being provided, and the implementation of that functionality. The term extension is used to describe all of this, the functionality and the implementation. Attached is a matrix of the functionality and implementations and how they align. The dots in the cells of the matrix represent the maturity of the relationship.
There are several types of functionality provided by the extensions system today, and more are slated for the future. -- Input. Input extensions take data from a file and bring it into Inkscape. Even reading SVG files (Inkscape's native format) is implemented as an internal extension. Input extensions can be chained so that extensions can be created that don't make it all the way to SVG directly. -- Output. Output extensions take the data from Inkscape and turn it into a file. SVG Output is an internal extension. Output extensions can also be chained. -- Effects. Effects are extension that take a document, and possibly a selection, and change it in some way. This could be anything from changing colors to generating fractals. These are similar to Filters in The GIMP. -- Path Effects. Path effects provide a way to change a path. They allow a user to edit a path using the standard Inkscape path editing tools, but then have it look differently than just a line. This could include everything from adding hash marks to making the line look like it's on fire. -- Tools. Tools are the ways that you draw in Inkscape. Rectangle tool, circle tool, star tool... the goal is to eventually have the ability to add tools as extensions.
While the functionality that the extension provides is described above, how that gets done is a different story. The Inkscape extensions system allows for programmers to implement their extension in a variety of ways, trying to match their particular skillset. -- Internal. Any extension type can be implement in C or C++ and directly linked into the Inkscape codebase. While in general the goal is to move as much out of the main Inkscape binary, this makes sense for many extensions including things like SVG input/output. -- Scripts. Scripts are where Inkscape uses standard in and standard out on an external executable to implement the functionality. This allow Inkscape to reuse a variety of utilities that already do format conversion or implement cool things in SVG. Typically the scripts that are effects use a SVG DOM library in their programming language of choice. -- XSLT. This implementation is done in the XSLT language, and uses libxml's XSLT parser that is already linked with Inkscape. -- DOM Scripts. As Inkscape finishes its DOM implementation the goal will be to provide this directly to scripts. This will allow for faster execution, but also other access to Inkscape's internals and algorithms.
Hope that helps!
--Ted