Tutorial | Dicas e Truques
Este tutorial demonstra várias dicas e truques que vários utilizadores descobriram ao utilizarem o Inkscape e algumas características "ocultas" que podem ajudar a acelerar tarefas de produção.
Posicionamento radial com "Clones Ladrilhados"
It's easy to see how to use the Create Tiled Clones dialog for rectangular grids and patterns. But what if you need radial placement, where objects share a common center of rotation? It's possible too!
Se o padrão radial apenas necessita de 3, 4, 6, 8 ou 12 elementos, então pode-se tentar as simetrias P3, P31M, P3M1, P4, P4M, P6 ou P6M. Estes padrões funcionam perfeitamente para flocos de neve e similares. No entanto o próximo método é mais genérico.
Choose the P1 symmetry (simple translation) and then compensate for that translation by going to the Shift tab and setting Perrow/Shift Y and Per column/Shift X both to -100%. Now all clones will be stacked exactly on top of the original. All that remains to do is to go to the Rotation tab and set some rotation angle per column, then create the pattern with one row and multiple columns. For example, here's a pattern made out of a horizontal line, with 30 columns, each column rotated 6 degrees:
Para obter um mostrador de relógio a partir disto, tudo o que é necessário fazer é cortar ou simplesmente cobrir a parte central com um círculo branco (para fazer operações booleanas nos clones, desligue-os primeiro dos caminhos originais).
Podem ser criados efeitos mais interessantes utilizando as linhas e as colunas. Aqui está um padrão com 10 colunas e 8 linhas, com rotação de 2 graus por linha e 18 graus por coluna. Neste caso, cada grupo de linhas é uma "coluna", assim os grupos estão a 18 graus um do outro, dentro de cada coluna e as linhas individuais estão 2 graus afastadas:
In the above examples, the line was rotated around its center. But what if you want the center to be outside of your shape? Just click on the object twice with the Selector tool to enter rotation mode. Now move the object's rotation center (represented by a small cross-shaped handle) to the point you would like to be the center of the rotation for the Tiled Clones operation. Then use Create Tiled Clones on the object. This is how you can do nice “explosions” or “starbursts” by randomizing scale, rotation, and possibly opacity:
Como fazer fatias (várias áreas retangulares exportadas)?
Create a new layer, in that layer create invisible rectangles covering parts of your image. Make sure your document uses the px unit (default), turn on grid and snap the rects to the grid so that each one spans a whole number of px units. Assign meaningful ids to the rects, and export each one to its own file (File⇒Export PNG Image (Shift+Ctrl+E)). Then the rects will remember their export filenames. After that, it's very easy to re-export some of the rects: switch to the export layer, use Tab to select the one you need (or use Find by id), and click Export in the dialog. Or, you can write a shell script or batch file to export all of your areas, with a command like:
inkscape -i area-id -t filename.svg
for each exported area. The -t switch tells it to use the remembered filename hint, otherwise you can provide the export filename with the -e switch. Alternatively, you can use the Extensions⇒Web⇒Slicer extensions, or Extensions⇒Export⇒Guillotine for similar results.
Gradientes não-lineares
A versão 1.1 do SVG não suporta gradientes não-lineares (ou seja, aqueles que têm uma transição não-linear entre as cores). Pode-se no entanto imitá-los através de gradientes com várias paragens.
Start with a simple two-stop gradient (you can assign that in the Fill and Stroke dialog or use the gradient tool). Now, with the gradient tool, add a new gradient stop in the middle; either by double-clicking on the gradient line, or by selecting the square-shaped gradient stop and clicking on the button Insert new stop in the gradient tool's tool bar at the top. Drag the new stop a bit. Then add more stops before and after the middle stop and drag them too, so that the gradient looks smooth. The more stops you add, the smoother you can make the resulting gradient. Here's the initial black-white gradient with two stops:
E aqui estão vários gradientes não-lineares com múltiplas paragens (examine-as no Editor de Gradiente):
Gradientes radiais excêntricos
Radial gradients don't have to be symmetric. In Gradient tool, drag the central handle of an elliptic gradient with Shift. This will move the x-shaped focus handle of the gradient away from its center. When you don't need it, you can snap the focus back by dragging it close to the center.
Alinhar ao centro da página
To align something to the center or side of a page, select the object or group and then choose Page from the Relative to: list in the Align and Distribute dialog (Shift+Ctrl+A).
Optimizar o documento
Many of the no-longer-used gradients, patterns, and markers (more precisely, those which you edited manually) remain in the corresponding palettes and can be reused for new objects. However if you want to optimize your document, use the Clean Up Document command in File menu. It will remove any gradients, patterns, or markers which are not used by anything in the document, making the file smaller.
Funcionalidades ocultas e o editor XML
The XML editor (Shift+Ctrl+X) allows you to change almost all aspects of the document without using an external text editor. Also, Inkscape usually supports more SVG features than are accessible from the GUI. The XML editor is one way to get access to these features (if you know SVG).
Alterar a unidade de medida das réguas
In the default template, the unit of measure used by the rulers is mm. This is also the unit used in displaying coordinates at the lower-right corner and preselected in all units menus. (You can always hover your mouse over a ruler to see the tooltip with the units it uses.) To change this, open Document Properties (Shift+Ctrl+D) and change the Display units on the Page tab.
Carimbo
To quickly create many copies of an object, use stamping. Just drag an object (or scale or rotate it), and while holding the mouse button down, press Space. This leaves a “stamp” of the current object shape. You can repeat it as many times as you wish.
Truques da ferramenta Caneta
Na ferramenta Caneta (Bézier), tem as seguintes opções para finalizar a linha atual:
Carregar na tecla Enter
Double click with the left mouse button
Click with the right mouse button
Selecionar outra ferramenta
Note that while the path is unfinished (i.e. is shown green, with the current segment red) it does not yet exist as an object in the document. Therefore, to cancel it, use either Esc (cancel the whole path) or Backspace (remove the last segment of the unfinished path) instead of Undo.
To add a new subpath to an existing path, select that path and start drawing with Shift from an arbitrary point. If, however, what you want is to simply continue an existing path, Shift is not necessary; just start drawing from one of the end anchors of the selected path.
Inserir valores Unicode
While in the Text tool, pressing Ctrl+U toggles between Unicode and normal mode. In Unicode mode, each group of 4 hexadecimal digits you type becomes a single Unicode character, thus allowing you to enter arbitrary symbols (as long as you know their Unicode codepoints and the font supports them). To finish the Unicode input, press Enter. For example, Ctrl+U+2+0+1+4+Enter inserts an em-dash (—). To quit the Unicode mode without inserting anything press Esc.
You can also use the Text⇒Unicode Characters dialog to search for and insert glyphs into your document.
Usar a grelha para desenhar ícones
Suppose you want to create a 24x24 pixel icon. Create a 24x24 px canvas (use the Document Preferences) and set the grid to 0.5 px (48x48 gridlines). Now, if you align filled objects to even gridlines, and stroked objects to odd gridlines with the stroke width in px being an even number, and export it at the default 96dpi (so that 1 px becomes 1 bitmap pixel), you get a crisp bitmap image without unneeded antialiasing.
Rotação de objetos
When in the Selector tool, click on an object to see the scaling arrows, then click again on the object to see the rotation and skew arrows. If the arrows at the corners are clicked and dragged, the object will rotate around the center (shown as a cross mark). If you hold down the Shift key while doing this, the rotation will occur around the opposite corner. You can also drag the rotation center to any place.
Or, you can rotate from keyboard by pressing [ and ] (by 15 degrees) or Ctrl+[ and Ctrl+] (by 90 degrees). The same [ ] keys with Alt perform slow pixel-size rotation.
Sombras caídas
To quickly create drop shadows for objects, use the Filters⇒Shadows and Glows⇒Drop Shadow feature.
You can also easily create blurred drop shadows for objects manually with blur in the Fill and Stroke dialog. Select an object, duplicate it by Ctrl+D, press PgDown to put it beneath original object, place it a little to the right and lower than original object. Now open Fill And Stroke dialog and change Blur value to, say, 5.0. That's it!
Colocar texto num caminho
To place text along a curve, select the text and the curve together and choose Put on Path from the Text menu. The text will start at the beginning of the path. In general it is best to create an explicit path that you want the text to be fitted to, rather than fitting it to some other drawing element — this will give you more control without screwing over your drawing.
Selecionar o original
When you have a text on path, a linked offset, or a clone, their source object/path may be difficult to select because it may be directly underneath, or made invisible and/or locked. The magic key Shift+D will help you; select the text, linked offset, or clone, and press Shift+D to move selection to the corresponding path, offset source, or clone original.
Recuperação de janelas fora do ecrã
When moving documents between systems with different resolutions or number of displays, you may find Inkscape has saved a window position that places the window out of reach on your screen. Simply maximise the window (which will bring it back into view, use the task bar), save and reload. You can avoid this altogether by unchecking the global option to save window geometry (Inkscape Preferences, Interface⇒Windows section).
Exportar transparências e gradientes para PostScript
PostScript or EPS formats do not support transparency, so you should never use it if you are going to export to PS/EPS. In the case of flat transparency which overlays flat color, it's easy to fix it: Select one of the transparent objects; switch to the Dropper tool (F7 or d); make sure that the Opacity: Pick button in the dropper tool's tool bar is deactivated; click on that same object. That will pick the visible color and assign it back to the object, but this time without transparency. Repeat for all transparent objects. If your transparent object overlays several flat color areas, you will need to break it correspondingly into pieces and apply this procedure to each piece. Note that the dropper tool does not change the opacity value of the object, but only the alpha value of its fill or stroke color, so make sure that every object's opacity value is set to 100% before you start out.
Interactivity
Most SVG elements can be tweaked to react to user input (usually this will only work if the SVG is displayed in a web browser).
The simplest possibility is to add a clickable link to objects. For this right-click the object and select Create Link from the context menu. The "Object attributes" dialog will open, where you can set the target of the link using the value of href.
More control is possible using the interactivity attributes accessible from the "Object Properties" dialog (Ctrl+Shift+O). Here you can implement arbitrary functionality using JavaScript. Some basic examples:
Open another file in the current window when clicking on the object:
Set onclick to window.location='file2.svg';
Open an arbitrary weblink in new window when clicking on the object:
Set onclick to window.open("https://inkscape.org","_blank");
Reduce transparency of the object while hovering:
Set onmouseover to style.opacity = 0.5;
Set onmouseout to style.opacity = 1;
Bulia Byak; Alexandre Prokoudine; Colin Marquardt; Ivan Masár; Kris De Gussem; Nicolas Dufour; Maren Hachmann; Roland Alton; Patrick Storz; Gellért Gyuris
Thiago Pimentel — 2006; Rui Cruz — 2016
Esteban Capella — 2019