Difference between revisions of "Sketch"
Legio noctis (talk | contribs) (→Styles) |
Legio noctis (talk | contribs) |
||
Line 60: | Line 60: | ||
=== Ellipses[[ | === Ellipses/[[Arcs]]: node editing === | ||
Like Inkscape, Skencil uses one tool for circles, ellipses and arcs. | Like Inkscape, Skencil uses one tool for circles, ellipses and arcs. |
Revision as of 11:15, 11 January 2010
Please post links to screenshots and/or insights of this vector app. We must learn from others.
Notable features
- About the only scriptable free-software vector graphics program.
- Bézier curves, rectangles and ellipses can be used as guides.
- Text along path, with choice between rotation or vertical skew of glyphs. (Inkscape has SVG text-on-path, which I think only allows rotation rather than skew.) (However, I think someone was saying that Inkscape allowed better editing of the path or text afterwards.)
- Can blend between paths (morphing).
- Written mainly in Python.
- "Conical gradients" as well as the linear & radial gradients supported by SVG/Inkscape.
- Claims to support masking; I haven't looked at its interface. (I believe Inkscape honours masking/clipping directives in SVG files, but has no user interface for this unless you count the boolean operations.)
- Has some import/export vector file formats that Inkscape lacks (cgm, cmx, fig). The import/export code is written in Python (see /usr/lib/ske*/Plugins/Filters/*{loader,saver}.py), so should be easy enough to adapt to SVG, or we could invoke skencil/skconvert to do the import/export as we do with sk_input.inx.
Layers
This screenshot showing the layer dialog has four toggle buttons for each layer: screen visibility; printing visibility (probably including visibility in exported bitmaps); lockedness; and a "show outline only" option. Each layer can have its own colour used when show-out-line-only is on.
There is a separate layer for guide objects/lines. The layer's show-outline-only option is always on, the print option is always off, while the visibility and lockedness options remain togglable.
The grid has its own layer too, unselectable, but useful as a consistent interface for controlling its visibility and the colour of the grid dots. (It uses dots rather than lines for its grid representation.) The grid layer is always locked an non-printing, while visibility and colour remain settable.
Having a separate grid layer may help in Inkscape if we use njh's suggestion for having canvas controls to edit the grid. This grid prototype is in experimental/grid-proto/
Styles
Skencil has a reasonable interface for named styles. Individual objects can override properties assigned by styles, and there is an "Update style" command to copy those changes back to the style.
There are some gaps in the interface: when creating a style, one can control whether the style controls line thickness, but I didn't see a way of changing that after creation. There seem to be some inconsistencies about whether an object can belong to more than one style or not.
Skencil style control certainly isn't as sophisticated as that offered by SVG/CSS, but we may borrow some things from it.
(Inkscape doesn't support named styles, unless you count inheriting styles from parents, such as layer membership.)
Tweening / Blending
[This section merely describes sketch 0.6's tweening, it is not a comparison between skencil's and inkscape's tweening. Consider moving/copying this to its own wiki page discussing how to implement tweening in inkscape.]
[Inkscape only recently (after most of this section was written) acquired a tweening function as an external script; I haven't looked at it yet, but I'd expect it not to be as powerful as sketch 0.6's tweening: e.g. external scripts in Inkscape can't give dynamic update.]
Good points in skencil's tweening functionality:
- "Dynamic": the mid-states are recomputed if you edit either of the end points. (See also bad points & limitations below.)
- Some degree of specialisation when begin & end objects have the same type. E.g. if the end objects are arcs/ellipses, then the tween states are arcs with interpolated start/end angles.
- I'd wondered whether it would be unintuitive/bad that tweening between some pairs of objects would give different tween states than if the objects had been converted to path, but I think skencil's behaviour is good: users can always explicitly convert to path if they wish.
Bad points & limitations:
- Little control over the interpolation:
- Can only specify the end points, can't specify one's own mid states except by doing n-1 tween operations (over each adjacent pair of one's objects), which would have to be plain linear (staight line segment) interpolation rather than curving.
- What would be really cool would be to allow editing the tween states it gives to create new custom mid states (and having all the non-customized tween states adapt to the new hint).
- Can't choose whether to interpolate positions or angles: e.g. if interpolating between two (analog) clock faces showing 12:00 and 12:25, then should all the tween states have the same length minute hand (tracing an arc around the clock), or should the end-point of the hand trace a straight line, thus shortening the minute hand towards the centre?
- (You may notice that angular interpolation is ambiguous in that there's a short and a long way, and two equal ways if the angle is 180 degrees. The same choice exists with SVG markers when choosing the "half way" angle. The resolution in each case is to take the shorter path, choosing arbitrarily in the 180 degree case. In the tweening case, the user can force the long route by specifying an in-between state.)
- Similarly, can't control colour interpolation. (SVG allows specifying colour interpolation for gradients & alpha compositing (http://www.w3.org/TR/SVG11/painting.html#ColorInterpolationProperties), though Inkscape doesn't currently implement this choice. Interpolating in HSV space would be useful for tweening -- not to mention animation and gradients.
- Tween states between a rectangle and an ellipse were unexpected: e.g. they aren't symmetrical (except 180-degree rotational symmetry), and aren't convex. I haven't looked into why; maybe just because the corresponding convert-to-path versions start & end in different places. If that is the only reason, then it can probably be fixed just by specializing the tweening for rectangle--ellipse pairs to use a different conversion to path than normal.
- I couldn't see how to "detach" the tween states (e.g. to edit them individually), other than by converting the whole lot to curves. (Do this with "Arrange->Ungroup", you have to ungroup them twice to get individual states).
- Limitation to dynamicness: one can't change the number of mid-states after creating them. (Presumably can easily be fixed given that the tween states can't be edited in skencil.)
- Similarly, one can't edit the proportion parameter of an individual tween state (like the stop proportion value in a gradient stop, a number from 0 to 1 indicating how similar to the begin or end state this tween state should be).
If implementing in Inkscape, then note that SVG/SMIL animation involves a similar operation to tweening.
Ellipses/Arcs: node editing
Like Inkscape, Skencil uses one tool for circles, ellipses and arcs. It uses the opposite convention for whether to show radial spokes (pacman, pie slice) or whether to show just the arc (with chord filling if filled): if the node tool is dragged outside of the corresponding ellipse, then it's a chord/pure arc in Skencil, whereas inside means pie slice / pacman.
For unfilled shapes, I think Skencil's choice is better (partly because pure arcs are more common than pie slices when unfilled, so it's good to assign it the alternative that gives more control.
For filled shapes, the argument of more-common-deserves-outside goes in Inkscape's favour.
When editing the placement of the radial spokes, it's slightly more intuitive putting the mouse inside the ellipse; though this is a minor argument.
Scriptability
Can we use Inkscape plugins to access any sketch features? Its web page says "many parts of Skencil can be used as a library (and are used by Skencil that way)".
Skencil has acquired a lot of useful functionality through its programmability, e.g. http://www.nongnu.org/skencil/addon.html
Areas where Inkscape is better to use than Skencil
- Better support for patterns.
- Better SVG support, as one would expect. (SVG is a foreign format for Skencil.)
- Skencil stable version 0.6.x uses tk interface. (Development version 0.7.x uses gtk.)
- Kerning (including vertical kerning, useful with/instead of text-on-path).
- Text-in-shape (textFlow); though this still has some rough edges.
- Clones (dynamically-updated copies)
- Calligraphy pen (including pressure/tilt sensitivity on Un*x platforms starting from 0.43).
The development version of skencil (0.7) allows transparency, whereas the stable 0.6.x version does not.
Some things become available to skencil through external scripts:
- Boolean operations (combining & breaking apart shapes) are available to skencil through the PathUtil script by Tamito Kajiyama.
- Weird shapes (like inkscape's star & spiral — and no doubt some things absent from inkscape) are in the AutoShapes script by Christof Ecker.
Screenshots
Links
License
LGPL