Very cool, this will be fun to show off at LGM. And I gather we now know what feature the next about screen should be showing off. ;-)
Bryce
On Wed, Apr 11, 2007 at 12:36:06AM -0300, bulia byak wrote:
Several new features were added to the Calligraphic pen to make Inkscape capable of the ancient art of '''line engraving'''. Traditional engraving is a very labour-intensive process, and while for a long time it was the only practical way of reproducing lifelike images in black-and-white print, about a century ago it was almost completely displaced by automatic halftone screens. However, line engravings have their characteristic charm, and there's no reason not to try to resurrect this art form with the help of Inkscape.
A brief visual guide to the new functionality can be seen on these screenshots:
http://inkscape.org/screenshots/gallery/inkscape-0.46-engraving1.png
http://inkscape.org/screenshots/gallery/inkscape-0.46-engraving2.png
- Tracking a guide path with Ctrl
One of the most common operations in line engraving is '''hatching''' (or sometimes ''cross-hatching'' when several hatching grids cross): filling a space with many parallel straight or variously curved lines (usually of varying width to represent a gradual shading). You could try to achieve a similar effect with e.g. path interpolation (blending), but it is rather cumbersome and limited; manual drawing of hatch lines, on the other hand, is tedious and nearly impossible to do uniformly. Now Inkscape provides "assisted hatching" by '''tracking a guide path''', allowing you to hatch quickly and uniformly and at the same time giving you sufficient manual control over the process.
Here's how to do this. First, select the '''guide path''' that you will track. It may be another calligraphic stroke, any path or shape, or even a letter of a text object. Then switch to Calligraphic pen, select the desired parameters (line width, angle, fixation etc.) and, before starting to draw, press Ctrl. You will see a gray '''track circle''' centered at your mouse pointer and touching the closest point on the selected guide path. (If you have no guide path selected, a statusbar message will tell you to select it).
Now move your mouse close to the guide path, so that the track circle radius is equal to the desired spacing of your hatch pattern, and start drawing along the guide path. At that moment, the radius of the circle gets locked; now the circle slides along the guide path - and the actual stroke is drawn by the center of the tracking circle, '''not'' by your mouse point. As a result, you are getting a smooth stroke going parallel to the guide path and always at the same distance from it.
When the stroke is ready, release your mouse button (or lift your tablet pen) but '''do not let go of the Ctrl key''' because as long as you have it pressed, the tool remembers the hatch spacing you set when you started drawing. Now, you have just created a new stroke and, as usual with Inkscape tools, it gets selected instead of what was selected before. In our case, this means that the newly drawn stroke itself becomes the new guide path. Next, you can draw a second stroke along the first one, then a third one along the second, etc. Eventually you can fill any desired space with uniform hatching.
The attachment to the guide path is not absolute. If you stray your mouse pointer far enough from the guide path, you will be able to tear it off (the track circle turns from green to red) and move freely. This is intentional; this feature allows you, for example, to continue drawing a stroke past the end of a guide stroke, thus making your hatching cover a wider area than the initial guide path. Special care is taken to make such tearing off as smooth as possible and to suppress violent jerks, but this is not always possible; the general advice is to not try to hatch too fast. If jerking and unintended tearoffs still bother you, try increasing the Mass parameter.
Also, special code is in place to prevent flipovers - accidental jumps to the other side of the guide path. Brief flipovers are suppressed, but if you intentionally go over to the other side and stay there, eventually Inkscape will obey and your tracked stroke will also flip over to follow you.
Tracking a guide also allows some slight feedback by gradually changing the tracking distance in response to your drawing behavior. Thus, if you're consistently trying to draw closer or farther from the guide than the current tracking distance, the distance will correspondingly decrease or increase, so you will get a hatching that is slightly spacing in or out. (The effect is very slight, however, so as not to become a nuisance.) Also, note that since tracking follows the edge of the stroke, strokes of varying width (such as those tracing background, see below) will result in gradual change of the hatching shape as you proceed.
- Tracing background by stroke width
There is a new toggle button on the Calligraphy tool's controls bar, '''Trace background'''. When on, the width of your pen depends on the lightness of the background under the stroke in each point, so that white translates into the minimum stoke width (1) and black translates to the maximum (which set by the Width parameter). This can work alone or in combination with pressure sensitivity, depending on whether the Pressure button is also toggled.
This feature allows you to not only hatch over an imported bitmap image or any drawing, but to do so automatically reproducing the highlights and shades of the background with your strokes becoming lighter and heavier as needed.
- Thinning/thickening of paths with Alt
Even with background tracing, the visible lightness/darkness of a hatching may not correspond too well to your artistic intention. Also, with guide tracking, the ends of strokes are often far from ideal - they may be too blunt or have unsightly bends or blobs. This is where the new thinning/thickening function is indispensable.
While in the Calligraphy tool, press Alt. You will see a orange-colored circle indicating the area that will be affected; this area is 10 times the size of the pen when you draw (so you can change it by changing the Width parameter on the toolbar). Now select some or all of the paths (as with most tools in Inkscape, only selected objects are changed), for example by pressing Ctrl+A, and start '''Alt+dragging''' over the paths. Where you touch them, paths become thinner, as if melting away, up until total disappearance. Conversely, '''Shift+Alt+dragging''' makes selected paths thicker in places where you touch them.
As with the Calligraphy pen itself, the '''size''' of the thinning/thickening area by default depends on zoom; simply zooming in or out is often easier than adjusting the width if you want to cover a smaller or larger area. The '''force''' of the effect also depends on zoom (or in other words, it stays the same when measured by screen pixels, same as when you move and object by Alt+arrow keys). Also, if you have a pressure-sensitive tablet, the force of thinning/thickening also depends on '''pen pressure'''; tapping slightly produces gradual lightening or darkening of your drawing, while pressing heavily will work as a kind of quick "erasing" (with Alt) or "blackening" (with Alt+Shift).
Of course, thinning/thickening is very useful '''not only for calligraphic strokes'''. You can select any simple path (such as an ellipse converted to path) and start '''sculpting''' it, spawning smooth treacle-like appendages with Alt+Shift and melting them away with Alt. Unlike the "node sculpting" mode in the Node tool, however, this does not require adding new nodes to the shape or selecting any nodes. This new functionality is somewhat similar to the "Pucker" and "Bloat" tools in the latest versions of Adobe Illustrator, except that in Inkscape it works softer and is easier to control.
'''Known problems with thinning/thickening:''' (1) it is rather slow; (2) it quickly eats memory; and (3) it is sometimes buggy
- thin calligraphic strokes may suddenly disappear or change
their shape drastically as you're Alt+stroking them. For (3), it helps to undo the bad change and try again with less pressure on the pen - if you do your thinning in several light touches instead of one heavy press, usually you will be able to get the desired result without the buggy behavior. In general, however, all these problems stem from the livarot library that we use for geometric manipulation of paths. Fortunately, livarot is scheduled for replacement by lib2geom, a new library now in development, so hopefully these issues will be addressed then.
- Misc features
- For consistency with other drawing tools, drawing with '''Shift'''
in Calligraphy tool automatically '''unions''' the newly created stroke with whatever paths were selected (and selects the result). Thus, you can do a series of overlapping Shift+strokes to create one unioned path object instead of separate objects as before.
- To facilitate changing the Width parameter, the Home/End keys in
Calligraphy tool switch you to the minimum (1) and maximum (100) width, correspondingly. (This is in addition to the Left/Right arrow keys that change Width by 1; remember also that you can press Alt+X, type any width, and press Enter.)
-- bulia byak Inkscape. Draw Freely. http://www.inkscape.org