Tutorial | Bàsic
This tutorial demonstrates the basics of using Inkscape. This is a regular Inkscape document that you can view, edit, copy from, or save.
The Basic Tutorial covers canvas navigation, managing documents, shape tool basics, selection techniques, transforming objects with selector, grouping, setting fill and stroke, alignment, and z-order. For more advanced topics, check out the other tutorials in the Help menu.
Desplaçament de l'àrea de dibuix
There are many ways to pan (scroll) the document canvas. Try Ctrl+arrow keys to scroll by keyboard. (Try this now to scroll this document down.) You can also drag the canvas by the middle mouse button. Or, you can use the scrollbars (press Ctrl+B to show or hide them). The wheel on your mouse also works for scrolling vertically; press Shift with the wheel to scroll horizontally.
Ampliació i reducció
The easiest way to zoom is by pressing - and + (or =) keys. You can also use Ctrl+middle click or Ctrl+right click to zoom in, Shift+middle click or Shift+right click to zoom out, or rotate the mouse wheel with Ctrl. Or, you can click in the zoom entry field (in the bottom right corner of the document window), type a precise zoom value in %, and press Enter. We also have the Zoom tool (in the toolbar on left) which lets you to zoom into an area by dragging around it.
L'Inkscape també manté un historial dels nivells d'ampliació que s'han utilitzat. Premeu la tecla ` per a anar a l'ampliació anterior, o Maj+` per anar a la següent.
Les eines de l'Inkscape
The vertical toolbar on the left shows Inkscape's drawing and editing tools. In the top part of the window, below the menu, there's the Commandsbar with general command buttons and the Tool Controlsbar with controls that are specific to each tool. The statusbar at the bottom of the window will display useful hints and messages as you work.
Many operations are available through keyboard shortcuts. Open Help⇒Keys and Mouse Reference to see the complete reference.
Creació i gestió de documents
To create a new empty document, use File⇒New or press Ctrl+N. To create a new document from one of Inkscape's many templates, use File⇒New from Template… or press Ctrl+Alt+N
To open an existing SVG document, use File⇒Open (Ctrl+O). To save, use File⇒Save (Ctrl+S), or File⇒Save As (Shift+Ctrl+S) to save under a new name. (Inkscape may still be unstable, so remember to save often!)
Inkscape uses the SVG (Scalable Vector Graphics) format for its files. SVG is an open standard widely supported by graphic software. SVG files are based on XML and can be edited with any text or XML editor (apart from Inkscape, that is). Besides SVG, Inkscape can import and export several other formats (EPS, PNG).
L'Inkscape obre una finestra separada per a cada document. Podeu navegar entre elles usant el vostre gestor de finestres (per exemple, ambAlt+Tab), o podeu utilitzar la drecera de l'Inkscape, Ctrl+Tab, que es mourà en cicle entre totes les finestres obertes (creeu un document nou i canvieu entre aquest i l'altre per a practicar). Nota: l'Inkscape tracta aquestes finestres com a pestanyes en un navegador web, el que vol dir que la drecera Ctrl+Tab només funciona amb documents que s'executin al mateix procés. Si obriu múltiples fitxers des d'un navegador de fitxers o llanceu Inkscape més d'un cop des d'una icona, això no funcionarà.
Creació de formes
Time for some nice shapes! Click on the Rectangle tool in the toolbar (or press F4) and click-and-drag, either in a new empty document or right here:
As you can see, default rectangles come up blue, with a black stroke (outline), and fully opaque. We'll see how to change that below. With other tools, you can also create ellipses, stars, and spirals:
These tools are collectively known as shape tools. Each shape you create displays one or more diamond-shaped handles; try dragging them to see how the shape responds. The Controls panel for a shape tool is another way to tweak a shape; these controls affect the currently selected shapes (i.e. those that display the handles) and set the default that will apply to newly created shapes.
Per a desfer la vostra última acció, premeu Ctrl+Z (o si torneu a canviar d'idea, podeu tornar-la a fer amb Maj+Ctrl+Z).
Moviment, escalat, gir
The most frequently used Inkscape tool is the Selector. Click the topmost button (with the arrow) on the toolbar, or press F1 or Space. Now you can select any object on the canvas. Click on the rectangle below.
Veureu com apareixen vuit nanses en forma de fletxa al voltant de l'objecte. Ara podeu:
Mourel'objecte arrossegant-lo (premeu Ctrl per limitar el moviment a horitzontal i vertical).
Escalar l'objecte arrossegant qualsevol nansa (premeu Ctrl per conservar la relació alçada/amplada original).
Ara torneu a fer clic en el rectangle. Les nanses canvien. Ara podeu:
Rotate the object by dragging corner handles. (Press Ctrl to restrict rotation to 15 degree steps. Drag the cross mark to position the center of rotation.)
Esbiaixar (cisallar) l'objecte arrossegant les nanses dels costats (amb Ctrl limiteu l'esbiaixat a passos de 15 graus).
While in Selector, you can also use the numeric entry fields in the Controls bar (above the canvas) to set exact values for coordinates (X and Y) and size (W and H) of the selection.
Transformació mitjançant tecles
One of Inkscape's features that set it apart from most other vector editors is its emphasis on keyboard accessibility. There's hardly any command or action that is impossible to do from keyboard, and transforming objects is no exception.
Podeu usar el teclat per a moure (tecles de fletxa), escalar (tecles < i >), i girar (tecles [ i ]) objectes. Els moviments i les escales predefinits són per 2 px; amb Maj., moveu 10 vegades més. Ctrl+> i Ctrl+< amplien o redueixen al 200% o al 50% de l'original, respectivament. Els girs predefinits són de 15º, i amb Ctrl, de 90º.
However, perhaps the most useful are pixel-sizetransformations, invoked by using Alt with the transform keys. For example, Alt+arrows will move the selection by 1 pixel at the current zoom (i.e. by 1 screen pixel, not to be confused with the px unit which is an SVG length unit independent of zoom). This means that if you zoom in, one Alt+arrow will result in a smaller absolute movement which will still look like one-pixel nudge on your screen. It is thus possible to position objects with arbitrary precision simply by zooming in or out as needed.
Similarly, Alt+> and Alt+< scale selection so that its visible size changes by one screen pixel, and Alt+[ and Alt+] rotate it so that its farthest-from-center point moves by one screen pixel.
Note: Linux users may not get the expected results with the Alt+arrow and a few other key combinations if their Window Manager catches those key events before they reach the inkscape application. One solution would be to change the WM's configuration accordingly.
Seleccions múltiples
Podeu seleccionar simultàniament qualsevol nombre d'objectes amb Maj+clic. O podeu arrossegar al voltant dels objectes que voleu seleccionar; això es diu la selecció de la cinta de goma (el selector crea una cinta de goma en arrossegar des d'un espai buit; no obstant això, si premeu Maj abans de començar a arrossegar, l'Inkscape crearà sempre la cinta de goma). Practiqueu-ho seleccionant les tres formes següents:
Ara, useu la cinta de goma (arrossegant-hi o amb Maj+arrossegar) per a seleccionar les dues el·lipsis, però no el rectangle:
Each individual object within a selection displays a selectioncue — by default, a dashed rectangular frame. These cues make it easy to see at once what is selected and what is not. For example, if you select both the two ellipses and the rectangle, without the cues you would have hard time guessing whether the ellipses are selected or not.
Fent Maj+clic sobre un objecte seleccionat, se l'exclou de la selecció. Seleccioneu els tres objectes anteriors i després utilitzeu Maj+clic per a excloure les dues el·lipsis de la selecció i deixar només el rectangle.
Pressing Esc deselects any selected objects. Ctrl+A selects all objects in the current layer (if you did not create layers, this is the same as all objects in the document).
Agrupació
Poden combinar-se diversos objectes en un grup. Un grup es comporta com un únic objecte quan l'arrossegueu o el transformeu. A sota, els tres objectes de l'esquerra són independents; els mateixos tres objectes a la dreta estan agrupats. Proveu d'arrossegar el grup.
To create a group, you select one or more objects and press Ctrl+G. To ungroup one or more groups, select them and press Ctrl+U. Groups themselves may be grouped, just like any other objects; such recursive groups may go down to arbitrary depth. However, Ctrl+U only ungroups the topmost level of grouping in a selection; you'll need to press Ctrl+U repeatedly if you want to completely ungroup a deep group-in-group.
You don't necessarily have to ungroup, however, if you want to edit an object within a group. Just Ctrl+click that object and it will be selected and editable alone, or Shift+Ctrl+click several objects (inside or outside any groups) for multiple selection regardless of grouping. Try to move or transform the individual shapes in the group (above right) without ungrouping it, then deselect and select the group normally to see that it still remains grouped.
Emplenat i contorn
Probably the simplest way to paint an object some color is to select an object, and click a swatch in the palette below the canvas to paint it (change its fill color). Alternatively, you can open the Swatches dialog from the View menu (or press Shift+Ctrl+W), select an object, and click a swatch to paint it (change its fill color).
Més potent és el diàleg «Emplenament i traç» del menú Objecte (o premeu Maj+Ctrl+F). Seleccioneu la forma de sota i obriu el diàleg «Emplenament i traç».
You will see that the dialog has three tabs: Fill, Stroke paint, and Stroke style. The Fill tab lets you edit the fill (interior) of the selected object(s). Using the buttons just below the tab, you can select types of fill, including no fill (the button with the X), flat color fill, as well as linear or radial gradients. For the above shape, the flat fill button will be activated.
Further below, you see a collection of color pickers, each in its own tab: RGB, CMYK, HSL, and Wheel. Perhaps the most convenient is the Wheel picker, where you can rotate the triangle to choose a hue on the wheel, and then select a shade of that hue within the triangle. All color pickers contain a slider to set the alpha (opacity) of the selected object(s).
Quan seleccioneu un objecte, el selector de color s'actualitza amb el seu emplenament i contorn (quan se selecciona més d'un objecte, es mostra el seu color mitjà). Jugueu amb aquestes mostres o creeu la vostra pròpia:
Utilitzant la pestanya Color del traç podeu eliminar el traç (contorn) de l'objecte, o assignar-li qualsevol color o transparència:
L'última pestanya, Estil del traç, us permet definir el gruix i altres paràmetres del traç:
Finally, instead of flat color, you can use gradients for fills and/or strokes:
When you switch from flat color to gradient, the newly created gradient uses the previous flat color, going from opaque to transparent. Switch to the Gradient tool (Ctrl+F1) to drag the gradient handles — the controls connected by lines that define the direction and length of the gradient. When any of the gradient handles is selected (highlighted blue), the Fill and Stroke dialog sets the color of that handle instead of the color of the entire selected object.
Yet another convenient way to change a color of an object is by using the Dropper tool (F7). Just click anywhere in the drawing with that tool, and the picked color will be assigned to the selected object's fill (Shift+click will assign stroke color).
Duplicació, alineació, distribució
One of the most common operations is duplicating an object (Ctrl+D). The duplicate is placed exactly above the original and is selected, so you can drag it away by mouse or by arrow keys. For practice, try to fill the line with copies of this black square:
Chances are, your copies of the square are placed more or less randomly. This is where the Align and Distribute dialog (Shift+Ctrl+A) is useful. Select all the squares (Shift+click or drag a rubberband), open the dialog and press the “Center on horizontal axis” button, then the “Make horizontal gaps between objects equal” button (read the button tooltips). The objects are now neatly aligned and distributed equispacedly. Here are some other alignment and distribution examples:
Ordenació en Z
The term z-order refers to the stacking order of objects in a drawing, i.e. to which objects are on top and obscure others. The two commands in the Object menu, Raise to Top (the Home key) and Lower to Bottom (the End key), will move your selected objects to the very top or very bottom of the current layer's z-order. Two more commands, Raise (PgUp) and Lower (PgDn), will sink or emerge the selection one step only, i.e. move it past one non-selected object in z-order (only objects that overlap the selection count, based on their respective bounding boxes).
Practiqueu aquestes ordres invertint l'ordre en z dels objectes següents, de forma que l'el·lipsi de més a l'esquerra quedi a dalt de tot i la de més a la dreta a sota de tot:
Una drecera de selecció molt útil és la tecla Tab. Si no hi ha res seleccionat, se selecciona l'objecte del capdavall; en cas contrari se selecciona l'objecte per sobre de l'objecte seleccionat en l'ordre z. Maj+Tab ho fa a l'inrevés, començant des del capdamunt i baixant cap avall. Ja que els objectes creats s'afegeixen al damunt de la pila, en fer Maj+Tab sense que hi hagi res seleccionat us permet seleccionar convenientment el darrer objecte creat. Practiqueu amb Tab i Maj+Tab a la pila d'el·lipsis de dalt.
Selecció per sota i arrossegar la selecció
Què fer si l'objecte que necessiteu està amagat darrere un altre objecte? Encara podrieu veure l'objecte de sota si el de sobre és (parcialment) transparent, però en clicar al damunt seleccionareu l'objecte de sobre, no pas el que necessiteu.
This is what Alt+click is for. First Alt+click selects the top object just like the regular click. However, the next Alt+click at the same point will select the object below the top one; the next one, the object still lower, etc. Thus, several Alt+clicks in a row will cycle, top-to-bottom, through the entire z-order stack of objects at the click point. When the bottom object is reached, next Alt+click will, naturally, again select the topmost object.
[Si esteu en Linux, podeu trobar-vos que Alt+clic no funciona correctament. Per contra, podria moure tota la finestra de l'Inkscape. Això ocorre perquè el gestor de finestres ha reservat la drecera Alt+clicper a una acció diferent. La manera de solucionar-ho és trobar la configuració del comportament de la finestra al gestor de finestres, i o bé desconnectar-ho, o bé assignar-li la tecla Meta(coneguda com a tecla del Windows), i així l'Inkscape i altres aplicacions poden usar la tecla Alt amb llibertat].
This is nice, but once you selected an under-the-surface object, what can you do with it? You can use keys to transform it, and you can drag the selection handles. However, dragging the object itself will reset the selection to the top object again (this is how click-and-drag is designed to work — it selects the (top) object under cursor first, then drags the selection). To tell Inkscape to drag whatis selected now without selecting anything else, use Alt+drag. This will move the current selection no matter where you drag your mouse.
Practiqueu el Alt+clic i el Alt+arrossegar en les dos formes marrons sota el rectangle verd transparent:
Selecció d'objectes similars
Inkscape can select other objects similar to the object currently selected. For example, if you want to select all the blue squares below first select one of the blue squares, and use Edit⇒Select Same⇒Fill Color from the menu. All the objects with a fill color the same shade of blue are now selected.
In addition to selecting by fill color, you can select multiple similar objects by stroke color, stroke style, fill & stroke, and object type.
Conclusió
This concludes the Basic tutorial. There's much more than that to Inkscape, but with the techniques described here, you will already be able to create simple yet useful graphics. For more complicated stuff, go through the Advanced and other tutorials in Help⇒Tutorials.
Bulia Byak; Jonathan Leighton; Ralf Stephan; Bryce Harrington; Alexandre Prokoudine; Colin Marquardt; Josh Andler; Nicolas Dufour; Gellért Gyuris
Francesc Dorca — 2003, 2005; Jordi Mas — 2015, 2017; Artur V. — 2020
Esteban Capella — 2019