Ceci est une ancienne révision du document !
Last month, we learned how to draw ellipses using the Circle tool. But you may have noticed that we didn't actually draw any circles, despite the tool's name. You may have got close by adjusting an ellipse by eye, but that's not quite the same as drawing a perfect circle. The secret to drawing a perfect circle is actually the secret to making the best use of Inkscape in general: you need to use the keyboard. Inkscape has a huge number of keyboard shortcuts and modifiers. Last month, I mentioned using the Plus and Minus keys to zoom in and out, but there are hundreds more listed on the Inkscape Keys and Mouse Reference – the URL is at the end of this article, but you can also get to it directly via the Help menu in Inkscape. Such a large number of shortcuts can be overwhelming, so I'm just going to introduce them a few at a time, starting with the CTRL and SHIFT keys.
Le mois dernier, nous avons appris à dessiner des ellipses à l'aide de l'outil Cercle. Mais vous avez sans doute remarqué que nous n'avons pas réellement tracé des cercles, malgré le nom de l'outil. Vous avez peut être obtenu quelquechose de proche en ajustant une ellipse à l’œil nu, mais ce n'est pas tout à fait la même chose que de dessiner un cercle parfait. Le secret pour dessiner un cercle parfait est en fait le secret pour faire le meilleur usage de Inkscape en général: vous devez utiliser le clavier.
Inkscape possède un grand nombre de raccourcis clavier et des modificateurs. Le mois dernier, j'ai mentionné l'aide des touches Plus et Moins pour effectuer un zoom avant et arrière, mais il y a des centaines d'autres figurant dans « Inkscape Keys and Mouse Reference » (l'URL est à la fin de cet article), mais vous pouvez également y accéder directement via le menu Aide dans Inkscape. Ce grand nombre de raccourcis peut être déboussolant, donc je vais juste vous les présentez quelques unes à la fois, en commençant avec les touches CTRL et MAJ.
These keys serve different purposes depending on what you're doing in Inkscape at the time that you press them, but, very broadly speaking, they usually have the following effects: CTRL: Lock or snap some aspect of the operation SHIFT: Affect the center or starting point for an operation An “operation” in this case refers to drawing, rotating, skewing, or otherwise manipulating an object. Let’s look at each of these keyboard modifiers when used with our Circles and Ellipses tool. Select the Circle tool by clicking its icon, or by pressing the “e” key (for ellipse) or the F5 key. Now hold down CTRL while you drag an ellipse out onto the canvas. You'll find that you can no longer smoothly adjust the width and height of the ellipse, but rather that it snaps to fixed ratios of 1:1, 1:2, 3:1, and so on. So the answer to the question of how to draw a circle is simply to hold down CTRL whilst drawing an ellipse.
Ces touches ont différents fonctions selon ce que vous faites dans Inkscape au moment où vous appuyez dessus, mais, en très gros, elles ont généralement les effets suivants: CTRL: permet de verrouiller ou déverrouiller certains aspects de l'opération MAJ: détermine le centre ou point de départ d'une opération
Une « opération » dans ce cas se réfère à dessiner, faire tourner, incliner, ou bien manipuler un objet. Examinons chacun de ces modificateurs clavier lorsqu'il est utilisé avec notre outil Cercles et Ellipses.
Sélectionnez l'outil Cercle en cliquant sur son icône ou en appuyant sur la touche 'e' (pour ellipse) ou sur la touche F5. Maintenant, maintenez la touche CTRL enfoncée pendant que vous dessinez une ellipse sur la page. Vous verrez que vous ne pouvez plus ajuster facilement la largeur et la hauteur de l'ellipse, mais au lieu de çà il se restreint à des taux fixes de 1:1, 1:2, 3:1, et ainsi de suite. Donc la réponse à la question de savoir comment tracer un cercle est de maintenir simplement la touche CTRL tout en dessinant une ellipse.
As well as locking the ratio when you first draw an object, the CTRL key can also be used to snap your subsequent edits to defined values. Try selecting your ellipse with the Circle tool active, then move the small circular control handles (to turn your ellipse into a segment or arc) while holding the CTRL key. You'll find that the handles snap to particular angles, defaulting to 15°. You can change that value via the File > Inkscape Preferences > Steps dialog, where you can choose from a selection of other angles via a drop down list, although the default is a good choice for most uses. Now try selecting an ellipse using the Select tool (previous page, pointer icon), then clicking a second time to enable the rotation and skewing handles. Hold down CTRL as you rotate your object, and you'll find that the same snapping action occurs. It also happens for skewing, but that's a little less obvious with an ellipse, so we'll come back to that one a little later.
De la même manière que le blocage du ratio lorsque vous dessinez un objet pour la première fois, la touche CTRL peut également être utilisée pour forcer les modifications suivantes à des valeurs définies. Essayez de sélectionner votre ellipse avec l'outil Cercle actif, puis déplacez les petites poignées circulaires de contrôle (pour transformer votre ellipse en un segment ou un arc) tout en maintenant la touche CTRL enfoncée. Vous verrez que les poignées se collent sur angles particuliers, par défaut à 15°. Vous pouvez modifier cette valeur via la boite de dialogue File > Inkscape Preferences > Steps, où vous pourrez choisir parmi une sélection d'autres angles via une liste déroulante, même si le défaut est un bon choix pour la plupart des utilisations.
Maintenant, essayez de sélectionner une ellipse à l'aide de l'outil Select (page précédente, icone de pointeur), puis de cliquer une deuxième fois pour activer les poignées de rotation et d'inclinaison. Maintenez la touche CTRL enfoncée lorsque vous faites pivoter votre objet, et vous verrez que la même action d'accrochage se produit. Ca marche aussi pour l'inclinaison, mais c'est un peu moins évident avec une ellipse, nous reviendrons donc à celui-là un peu plus tard.
Click on the ellipse again to switch back to the move and scale handles. If you try dragging your ellipse around, you'll find that the CTRL key locks you to only horizontal or vertical movements. Now, try resizing with the arrow handles, and you'll discover that the CTRL key locks the aspect ratio of your ellipse – you can make it bigger and smaller, but it will keep the same ratio of width to height. If you use a mouse with a wheel, then the CTRL key has another feature: hold it down as you scroll the mouse wheel in order to quickly zoom in and out of your document. While you're playing with the mouse wheel, try using it to click and drag the canvas around – a much faster way to pan around your drawing than using the scroll bars. Now let's consider the SHIFT key. Try holding it down while drawing a new ellipse. Notice that it's being drawn relative to the center of the ellipse, rather than the corner. One of the most common uses for the SHIFT key in Inkscape is to change the starting or reference point for an operation.
Cliquez encore sur l'ellipse pour revenir aux poignées de déplacement et d'échelle. Si vous essayez de faire glisser votre ellipse, vous verrez que la touche CTRL vous enferme dans des mouvements horizontaux ou verticaux. Maintenant, essayez de redimensionner avec les poignées flèches, et vous découvrirez que la touche CTRL verrouille les proportions de votre ellipse - vous pouvez la faire plus grande et plus petite, mais elle gardera le même rapport entre la largeur et la hauteur.
Si vous utilisez une souris à molette, alors la touche CTRL a une autre fonction : maintenez-la enfoncée lorsque vous faites rouler la molette de la souris pour zoomer rapidement dans et hors de votre document. Pendant que vous jouez avec la molette, essayez de l'utiliser pour cliquer et faire glisser la page, une manière beaucoup plus rapide pour vous déplacer dans votre dessin qu'avec les ascenseurs.
to do
Select an ellipse using the Select tool, then hold SHIFT as you resize it with the arrow handles. Notice how the reference point for your actions has switched to the center of the ellipse. Try pressing and releasing SHIFT while you're in the middle of resizing the ellipse to make it more obvious. You don't have to press these modifiers right at the start of an operation, you can press and release them at any point. The only thing that matters is whether they're pressed when you release the mouse button. Click the ellipse to switch to rotation mode, and hold SHIFT while you rotate or skew using the handles. You should see the small cross that indicates the rotation center jump to the opposite corner or side from the handle you're moving, and your ellipse will rotate or skew around that reference point. You can also combine the CTRL and SHIFT keys. Press both as you draw with the Circle tool in order to create a perfect circle drawn out from its center point, or while you rotate your ellipse to rotate it in 15° steps around the opposite corner from the rotation handle.
Let's finish this month with a new shape: there's only so much you can draw with circles and ellipses so we'll create some rectangles and squares instead. For this, we'll use the Rectangle tool (shown left. Press F4 or “r”). Start by clicking on the button in the toolbox, then drag your shape out on the drawing canvas, just as you've been doing with ellipses. You should now have a nice rectangle: Notice how your rectangle has small square and circular handles, like those on the ellipses. The two square handles are used to adjust the width and height. Hold SHIFT as you move them to constrain your changes to just one direction or the other. The circle handle, like that on an ellipse, is actually a pair of handles on top of one another. Move just one of them (or hold CTRL whilst moving either of them), and you'll get nice symmetrically-rounded corners to your rectangle – like a quarter of a circle. Move both of them and you'll get an elliptically-rounded corner instead. If you want to go back to perfect 90° corners, simply SHIFT-click one of the circular handles, or use the button at the end of the Tool Control bar (just above the canvas).
The CTRL and SHIFT keys work in a very similar way with the Rectangle tool as they do with the Circle tool: hold down CTRL while you draw your rectangle to constrain it to fixed ratios if you want to create a perfect square, or hold down SHIFT if you want to draw from the center outwards rather than corner to corner. Of course you can change the color of the fill and stroke for your rectangles – just as we did with ellipses last month. You can also use the Select tool to move, resize, rotate, and skew them – and if you hold down CTRL while skewing a rectangle, it's a lot more obvious what's happening than it is with an ellipse. Now that you can create rectangles and squares, why not enhance that snowman you drew last month by adding a hat and pipe? Useful Links: Keys and Mouse Reference: http://inkscape.org/doc/keys048.html