Tutorial | FormeQuesto tutorial si occupa dei quattro strumenti forma: Rettangolo, Ellisse, Stella e Spirale. Verranno dimostrate le capacità delle forme di Inkscape, anche con esempi di come e quando usarle.Use Ctrl+Arrows, mousewheel, or middle button drag to scroll the page down. For basics of object creation, selection, and transformation, see the Basic tutorial in HelpTutorials.Inkscape ha quattro strumenti forma versatili, ognuno capace di creare e modificare il proprio tipo di forma. Una forma è un oggetto modificabile in modi unici per quel tipo di forma, usando le maniglie trascinabili e i parametri numerici che determinano la sua apparenza.For example, with a star you can alter the number of tips, their length, angle, rounding, etc. — but a star remains a star. A shape is “less free” than a simple path, but it's often more interesting and useful. You can always convert a shape to a path (Shift+Ctrl+C), but the reverse conversion is not possible.Gli strumenti forma sono Rettangolo, Ellisse, Stella e Spirale. Innanzitutto, guarderemo come funzionano in generale, poi analizzeremo ciascuno in dettaglio.Suggerimenti generaliA new shape is created by dragging on canvas with the corresponding tool. Once the shape is created (and so long as it is selected), it displays its handles as white diamond, square or round marks (depending on the tools), so you can immediately edit what you created by dragging these handles.All four kinds of shapes display their handles in all four shape tools as well as in the Node tool (F2). When you hover your mouse over a handle, it tells you in the statusbar what this handle will do when dragged or clicked with different modifiers.Inoltre, per ogni strumento forma vengono visualizzati i relativi parametri nella Barra dei controlli strumento (posizionata orizzontalmente sopra l'area di lavoro). Solitamente sono presenti dei campi numerici e pulsanti per reimpostare i valori predefiniti. Quando oggetti del tipo dello strumento attualmente in uso sono selezionati, la modifica dei parametri della barra dei controlli modifica gli stessi oggetti.Qualsiasi modifica applicata nella barra dei controlli viene ricordata e utilizzata per il prossimo oggetto disegnato con lo stesso strumento. Per esempio, dopo aver modificato il numero dei vertici di una stella, le nuove stelle avranno lo stesso numero di vertici. Inoltre, selezionando un oggetto vengono aggiornati i parametri nella barra dei controlli impostandoli quindi per le successive forme.When in a shape tool, selecting an object can be done by clicking on it. Ctrl+click (select in group) and Alt+click (select under) also work as they do in Selector tool. Esc deselects.RettangoliUn rettangolo è la forma più semplice e probabilmente la più comune nei design e nelle illustrazioni. Inkscape cerca di rendere la creazione e la modifica dei rettangoli la più semplice possibile.Puoi passare allo strumento Rettangolo con F4 o cliccando sull'icona nella barra degli strumenti. Prova a disegnare un nuovo rettangolo accanto a quello blu qui sotto:disegna quiSuccessivamente, senza deselezionare lo strumento rettangolo, cambia selezione da un rettangolo all'altro cliccando su di essi.Scorciatoie per il disegno di rettangoli:With Ctrl, draw a square or an integer-ratio (2:1, 3:1, etc) rectangle.With Shift, draw around the starting point as center.Come si può vedere, il rettangolo selezionato (il rettangolo appena disegnato è ancora attivo) mostra tre maniglie su tre vertici della forma. In realtà sono presenti quattro maniglie, ma due (sul lato alto destro) sono sovrapposte nel caso in cui il rettangolo non sia arrotondato. Queste sono le maniglie di arrotondamento, le altre sue (in alto a sinistra e in basso a destra) sono maniglie di ridimensionamento.Innanzitutto osserviamo le maniglie di arrotondamento. Trascinando una maniglia verso il basso, tutti e quattro i lati del rettangolo vegono arrotondati mentre la seconda maniglia rimane ferma nella posizione originale. Se si vogliono degli angoli arrotondati, questo è sufficiente. Se si vogliono degli angoli arrotondati maggiormente lungo un lato, è necessario muovere la seconda maniglia verso sinistra.Qui sotto, i primi due rettangoli hanno angoli arrotondati circolari, mentre gli altri due hanno angoli arrotondati ellittici:Angoli arrotondati ellitticiAngoli arrotondati circolariSempre con lo strumento rettangolo, puoi provare a selezionare uno dei rettangoli qui sopra e osservare le loro maniglie di arrotondamento.Spesso, il raggio di arrotondamento e la dimensione del rettangolo devono rimanere costanti all'interno di una composizione, anche se le dimensioni dei rettangoli differiscono. Passando allo strumento Selettore, sono presenti quattro pulsanti raggruppati, di questi il secondo da sinistra mostra due angoli arrotondati concentrici. Con questo è possibile controllare il ridimensionamento degli angoli arrotondati durante il ridimensionamento del rettangolo.For example, here the original red rectangle is duplicated and scaled several times, up and down, to different proportions, with the “Scale rounded corners” button off:Ridimensionamento rettangoli arrotondati con adattamento degli angoli arrotondati disattivataSi può notare come la dimensione e la forma degli angoli arrotondati sia la stessa in tutti i rettangoli, in modo da allineare esattamente gli angoli nel lato in alto a destra. Tutti i rettangoli tratteggiati sono ottenuti dal rettangolo originale rosso ridimensionando con lo strumento Selettore, senza alcuna modifica alle maniglie di arrotondamento.For a comparison, here is the same composition but now created with the “Scale rounded corners” button on:Ridimensionamento rettangoli arrotondati con adattamento degli angoli arrotondati attivataNow the rounded corners are as different as the rectangles they belong to, and there isn't a slightest agreement in the top right corner (zoom in to see). This is the same (visible) result as you would get by converting the original rectangle to a path (Ctrl+Shift+C) and scaling it as path.Qui sono elencate le scorciatoie per le maniglie di arrotondamento di un rettangolo:Drag with Ctrl to make the other radius the same (circular rounding).Ctrl+click to make the other radius the same without dragging.Shift+click to remove rounding.You may have noticed that the Rectangle tool's Controls bar shows the horizontal (Rx) and vertical (Ry) rounding radii for the selected rectangle and lets you set them precisely using any length units. The Not rounded button does what is says — removes rounding from the selected rectangle(s).An important advantage of these controls is that they can affect many rectangles at once. For example, if you want to change all rectangles in the layer, just do Ctrl+A (Select All) and set the parameters you need in the Controls bar. If any non-rectangles are selected, they will be ignored — only rectangles will be changed.Ora diamo un'occhiata alle maniglie di ridimensionamento di un rettangolo. Ci si potrebbe chiedere il motivo della loro utilità quando è possibile ridimensionare il rettangolo con il Selettore.La limitazione dello strumento Selettore è il movimento orizzontale e verticale che rimane sempre relativo alla pagina del documento. Al contrario, le maniglie di ridimensionamento di un rettangolo ridimensionano lungo i lati del rettangolo, anche se il rettangolo viene ruotato o inclinato. Per esempio, prova a ridimensionare il rettangolo qui sotto prima con il Selettore e successivamente con le maniglie dello strumento Rettangolo:Poiché le maniglie di ridimensionamento sono due, è possibile ridimensionare il rettangolo in qualsiasi direzione o anche spostarlo lungo i suoi lati. Le maniglie di ridimensionamento mantengono sempre i raggi di arrotondamento.Qui sono elencate le scorciatoie per le maniglie di ridimensionamento:Drag with Ctrl to snap to the sides or the diagonal of the rectangle. In other words, Ctrl preserves either width, or height, or the width/height ratio of the rectangle (again, in its own coordinate system which may be rotated or skewed).Here is the same rectangle, with the gray dotted lines showing the directions to which the resize handles stick when dragged with Ctrl (try it):Snapping of rectangle - resize handles with CtrlDuplicando e ridimensionando lo stesso rettangolo con le maniglie di ridimensionamento è possibile creare composizioni 3D: 3 rettangoli originaliSeveral rectangles copied and resized by handles(mostly with Ctrl)Qui sono presenti alcuni esempi di composizioni di rettangoli con angoli arrotondati e riempimenti a gradiente:EllissiLo strumento Ellisse (F5) permette di disegnare ellissi e cerchi, che possono diventare segmenti o archi. Le scorciatoie di disegno sono le stesse di quelle dello strumento Rettangolo:With Ctrl, draw a circle or an integer-ratio (2:1, 3:1, etc.) ellipse.With Shift, draw around the starting point as center.Diamo un'occhiata alle maniglie di un ellisse. Seleziona qui sotto:Once again, you see three handles initially, but in fact they are four. The rightmost handle is two overlapping handles that let you “open” the ellipse. Drag that rightmost handle, then drag the other handle which becomes visible under it, to get a variety of pie-chart segments or arcs:Per ottenere un segmento (un arco con i due raggi), trascina verso l'esterno dell'ellisse. Per ottenere un arco, trascina verso l'interno. Sopra sono presenti 4 segmenti a sinistra e 3 archi a destra. Gli archi sono delle forme aperte, quindi il contorno scorre lungo l'ellisse ma non so chiude. Si può osservare semplicemente rimuovendo il colore di riempimento, lasciando solo il colore di contorno:15SegmentiArchiNote the fan-like group of narrow segments on the left. It was easy to create using angle snapping of the handle with Ctrl. Here are the arc/segment handle shortcuts:With Ctrl, snap the handle every 15 degrees when dragging.Shift+click to make the ellipse whole (not arc or segment).The snap angle can be changed in Inkscape Preferences (in BehaviorSteps).Le altre due maniglie sono utilizzate per ridimensionare l'ellisse attorno al suo centro. Le scorciatoie di queste maniglie sono simili a quelle per gli angoli arrotondati di un rettangolo:Drag with Ctrl to make a circle (make the other radius the same).Ctrl+click to make a circle without dragging.Come per le maniglie di ridimensionamento di un rettangolo, le maniglie dell'ellisse modificano l'altezza e la larghezza nel proprio sistema di riferimento. Ciò significa che un'ellisse ruotata o inclinata può essere semplicemente allungata o stretta lungo gli assi originali mantenendo la rotazione o l'inclinazione. Puoi provare a ridimensionare una delle sottostanti ellissi con le loro maniglie:StelleLe stelle sono le forme più complesse in Inkscape.Lo strumento stella può disegnare due oggetti differenti: stelle e poligoni. Una stella ha due maniglie le cui posizioni definiscono la lunghezza e la forma dei propri vertici. Un poligono ha solo una maniglia che, se trascinata, ruota e ridimensiona il poligono:StellaPoligonoNella barra dei controlli dello strumento Stella, i primi due pulsanti controllano il tipo di forma disegnata (poligono regolare o stella). Successivamente è presente un campo numerico che imposta il numero di vertici della stella o del poligono. Questo parametro è modificabile solo nella barra dei controlli. Il numero di vertici può variare da 3 a 1024, anche se non è consigliato eccedere (oltre 200) se il computer è lento.Durante il disegno di una nuova stella o poligono,Drag with Ctrl to snap the angle to 15 degree increments.Le due maniglie della stella hanno delle funzioni leggermente differenti. La prima maniglia (inizialmente sul vertice, cioè su un angolo convesso della stella) modifica la lunghezza del raggio, ma applicando una rotazione (rispetto al centro della forma) l'altra maniglia ruota concordemente. Ciò significa che non è possibile inclinare i raggi della stella con questa maniglia.L'altra maniglia (inizialmente sull'angolo concavo tra due vertici) è libera di muoversi radialmente e tangenzialmente, senza influenzare la maniglia al vertice. (Infatti questa maniglia può anch'essa divenire un vertice muovendola più lontana dall'altra maniglia rispetto al centro). Questa maniglia può distorcere le punte della stella per ottenere varie forme:Se si vuole una stella semplice e regolare senza nessun effetto, è possibile rendere il comportamento della distorsione come quella non deformata:Drag with Ctrl to keep the star rays strictly radial (no skew).Ctrl+click to remove the skew without dragging.As a useful complement for the on-canvas handle dragging, the Controls bar has the Spoke ratio field which defines the ratio of the two handles' distances to the center.Inkscape offre due ulteriori funzionalità. Geometricamente, un poligono è una forma con lati diritti e angoli appuntiti. Ciò nonostante spesso è utile avere vari gradi di curvatura e arrotondamento e Inkscape è in grado di fare questo. L'arrotondamento di una stella o un poligono funziona in maniera lievemente differente che per i rettangoli. Non vengono utilizzate maniglie dedicate, bensìShift+drag a handle tangentially to round the star or polygon.Shift+click a handle to remove rounding."Tangenzialmente" significa in una direzione perpendicolare al centro. Se si "ruota" una maniglia con Maiusc in senso antiorario attorno al centro, si ottiene un arrotondamento positivo. Nel senso antiorario invece si ottiene un arrotondamento negativo. (Sotto sono presenti esempi di arrotondamento negativo).Qui sotto sono paragonati un rettangolo (strumento Rettangolo) e un poligono a 4 lati (strumento Stella) arrotondati:RoundedpolygonRoundedrectangleAs you can see, while a rounded rectangle has straight line segments in its sides and circular (generally, elliptic) roundings, a rounded polygon or star has no straight lines at all; its curvature varies smoothly from the maximum (in the corners) to the minimum (mid-way between the corners). Inkscape does this simply by adding collinear Bezier tangents to each node of the shape (you can see them if you convert the shape to path and examine it in Node tool). The Rounded parameter which you can adjust in the Controls bar is the ratio of the length of these tangents to the length of the polygon/star sides to which they are adjacent. This parameter can be negative, which reverses the direction of tangents. The values of about 0.2 to 0.4 give “normal” rounding of the kind you would expect; other values tend to produce beautiful, intricate, and totally unpredictable patterns. A star with a large roundedness value may reach far beyond the positions of its handles. Here are a few examples, each indicating its roundedness value:0.250.250.250.370.433.003.000.415.431.850.213.00 −0.43−8.940.39If you want the tips of a star to be sharp but the concaves smooth or vice versa, this is easy to do by creating an offset (Ctrl+J) from the star:Original starLinked offset, insetLinked offset, outsetShift+dragging star handles in Inkscape is one of the finest pursuits known to man. But it can get better still.To closer imitate real world shapes, Inkscape can randomize (i.e. randomly distort) its stars and polygons. Slight randomization makes a star less regular, more humane, often funny; strong randomization is an exciting way to obtain a variety of crazily unpredictable shapes. A rounded star remains smoothly rounded when randomized. Here are the shortcuts:Alt+drag a handle tangentially to randomize the star or polygon.Alt+click a handle to remove randomization.As you draw or handle-drag-edit a randomized star, it will “tremble” because each unique position of its handles corresponds to its own unique randomization. So, moving a handle without Alt re-randomizes the shape at the same randomization level, while Alt-dragging it keeps the same randomization but adjusts its level. Here are stars whose parameters are exactly the same, but each one is re-randomized by very slightly moving its handle (randomization level is 0.1 throughout): And here is the middle star from the previous row, with the randomization level varying from -0.2 to 0.2: +0.2+0.10−0.1−0.2Alt+drag a handle of the middle star in this row and observe as it morphs into its neighbors on the right and left — and beyond.You will probably find your own applications for randomized stars, but I am especially fond of rounded amoeba-like blotches and large roughened planets with fantastic landscapes: SpiraliInkscape's spiral is a versatile shape, and though not as immersing as the star, it is sometimes very useful. A spiral, like a star, is drawn from the center; while drawing as well as while editing, Ctrl+drag to snap angle to 15 degree increments.Once drawn, a spiral has two handles at its inner and outer ends. Both handles, when simply dragged, roll or unroll the spiral (i.e. “continue” it, changing the number of turns). Other shortcuts: Outer handle: Shift+drag to scale/rotate around center (no rolling/unrolling).Alt+drag to lock radius while rolling/unrolling.Inner handle: Alt+drag vertically to converge/diverge.Alt+click to reset divergence.Shift+click to move the inner handle to the center.The divergence of a spiral is the measure of nonlinearity of its winds. When it is equal to 1, the spiral is uniform; when it is less than 1 (Alt+drag upwards), the spiral is denser on the periphery; when it is greater than 1 (Alt+drag downwards), the spiral is denser towards the center:0.20.5621The maximum number of spiral turns is 1024. Just as the Ellipse tool is good not only for ellipses but also for arcs (lines of constant curvature), the Spiral tool is useful for making curves of smoothly varying curvature. Compared to a plain Bezier curve, an arc or a spiral is often more convenient because you can make it shorter or longer by dragging a handle along the curve without affecting its shape. Also, while a spiral is normally drawn without fill, you can add fill and remove stroke for interesting effects.Especially interesting are spirals with dotted stroke — they combine the smooth concentration of the shape with regular equispaced marks (dots or dashes) for beautiful moire effects: ConclusioniInkscape's shape tools are very powerful. Learn their tricks and play with them at your leisure — this will pay off when you do your design work, because using shapes instead of simple paths often makes vector art faster to create and easier to modify. If you have any ideas for further shape improvements, please contact the developers. Bulia Byak; Jonathan Leighton; Colin Marquardt; Nicolas Dufour; Gellért GyurisFiras Hanife — 2014Esteban Capella — 2019