Ceci est une ancienne révision du document !
Before you skip on past this tutorial thinking it's not for you, I'm going to let you in on a little secret: I can't draw. If you give me a pencil and paper, or sit me in front of The GIMP with an expensive graphics tablet, then I'll easily be bested by a four-year-old. Yet, somehow, I'm one of the artists for a regular webcomic. So, how does a fat-fingered cave painter like me manage to produce artistic works? I use Inkscape.
Inkscape is no replacement for an artistic eye, or three years at art school, but, if your problem is largely one of hand-eye coordination, then it offers you something that pencils and The GIMP don't. It gives you the opportunity to tweak and modify every line and shape that you draw - until you're happy with the result. If your hand-drawn lines are close, but not quite what you'd imagined, Inkscape gives you the time and tools to alter them, rather than having to throw them away and try again. So, before you dismiss this tutorial because you're not a natural artist, why not have a try anyway – you might surprise yourself. If art comes naturally to you, then you've already got a head start, but, hopefully, you'll be able to pick up some Inkscape-specific tricks and tips along the way.
Let's begin by getting a copy of Inkscape. It's in the repositories of most desktop Linux distributions, so just use your normal package installer. These tutorials will be based on the 0.48 series, which has been the stable version for some time now.
On first launching Inkscape, you'll be presented with a blank working area, surrounded by a variety of toolbars, and a menu bar at the top of the window (or at the top of the screen if you're using Unity on a recent Ubuntu release). The exact arrangement of the toolbars can be modified to a limited degree: you can show and hide them using the View > Show/Hide menu, and you can switch between three predefined layouts using the Default, Custom, and Wide options at the bottom of the View menu. For these tutorials, I'll be using the Custom layout (which is badly named, as it doesn't let you customise it at all), with all the toolbars visible, and resulting in a main window that looks something like that shown left.
Now, let's draw something. From the Toolbox (which runs down the left regardless of your screen layout), click on the Circles and Ellipses tool (left).
Move your cursor back into the working area and you should notice that the pointer has changed to indicate that you're using the Circle tool. In the working area is an outline that represents your page – although Inkscape will happily let you draw outside its boundaries - which provides you with a large area for rough work, reference images or anything else that you don't want to appear on your printed page or exported image. Click within the page, and drag to the right and downwards to create an ellipse, releasing the mouse button when you're happy with its size and shape. Yours will probably be a different color, but we'll sort that out shortly.
Your ellipse should have a dotted line around it, indicating that it's currently selected. Many operations in Inkscape only work on the objects that are currently selected. The quickest way to de-select everything is to click on a blank section of the working area, away from any of the objects you've drawn. To re-select your ellipse just click on it with the Circles and Ellipsis tool still active.
As well as the dotted line, you should see two small squares and a small circle on the edge of your ellipse. These are referred to as “handles”, and are a graphical way for you to modify some of the properties of your objects. Try moving one of the square handles by dragging it with the mouse: it changes the radius of the ellipse in one direction. The second square handle changes on the other radius.
The circle is a little different – it's actually a pair of circles on top of each other. They allow you to turn your circle into a segment or an arc. Try dragging one round the outline of the ellipse. Now drag the other. Inkscape tries to guess whether you want a segment or an arc, so will flip between the two modes as you move the handles. You can switch between them manually using the buttons on the Tool Control Bar, just above the drawing area. Clicking on the third button will put the handles on top of each other once more, returning you to a full ellipse.
Let's give your ellipse a little color. Select it and look down to the bottom-left of the Inkscape window. There you will find a pair of colored swatches labelled Fill and Stroke. Fill shows the color that is used to draw the inside of your ellipse, while Stroke shows the color that is used to draw its outline. You can right-click on the number next to the Stroke swatch to pick from a few standard sizes if your stroke is too thick or thin.
Above those two swatches, you'll find a whole load more swatches stretching the width of the window. This is referred to as the color palette. Click on a swatch in the palette to set the fill color of the currently selected object, and SHIFT-click to set the stroke color. At the far left of the palette is a swatch with a cross through it which can be used to set the fill or stroke to transparent. Try setting the fill to transparent and giving the stroke a color. Now play with the circular handles and the Segment and Arc buttons – it should be a bit clearer why the latter is so named.
Finally let's move the ellipse around on the page. For this you'll need to click on the Select tool, which is the first button in the toolbox and looks like an arrow (left).
With this tool enabled, you can move an object simply by clicking and dragging it. When an object is selected using the Select tool, you'll see a dotted line around it, but rather than the small square and circular handles we saw when the Circle tool was active, you'll see some arrow-shaped handles arranged around the outside of the dotted line.
Dragging these arrows will let you change the width and height of the ellipse. Although they may seem to have the same effect as the small square handles you used earlier, they're subtly different. Try clicking on the ellipse a second time, as though you're trying to select it again. The handles change to a different collection of arrows, and a small cross appears in the center of the object.
By dragging the arrows at the corners you can rotate your object. The handles at the sides let you skew it. Try playing with them to get a feel for how they work. You can drag the little cross around to change the center of rotation; SHIFT-click on it to return it to the middle of the object. A single click on the ellipse will switch back and forth between the resize and rotate modes.
A double-click will switch you to the Circle tool, letting you gain access to the small square and circular handles once more. Try rotating an ellipse using the Select tool, then double-click to access the square handles and change the ellipse using them. Back to the Select tool and change the width and height using the arrow handles. See, I told you they were different!
If you draw a few more circles and ellipses and move them around, you'll soon find that they can overlap or obscure each other as though they're stacked on top of one another. When you select an object with the Select tool, you'll find a group of four icons which let you move your objects up and down so that they appear in front of or behind other objects. The first and last buttons will make your object jump to the back or front of the stack, whereas the second and third let you nudge the object down and up by one position at a time.
Sometimes you might need to get a closer view of the objects you create – or zoom out for an overview. We'll cover that in detail in a later article, but for now you can simply use the plus (+) and minus (-) keys on your keyboard to zoom in and out, and use the scrollbars to move your view around.
Now you know how to create ellipses, segments, and arcs, change their colors, and adjust the thickness of the stroke. You can move them around on the page and nudge them up and down in the stack of objects you've created. You can zoom in and out and move around the canvas. Next time we'll introduce some other shapes, but even with just ellipses, segments, and arcs, you can start to make some simple images: although it's not really the right season for it, how about drawing a snowman.
Finally, you should save your work using the File > Save (or Save As…) menu. There's a pop-up menu in the save dialogue that lets you choose between various formats. For now just choose Inkscape SVG, the first item on the list – I'll cover some of the other options in a future instalment.