Capitolo 7. Geometric Shapes


Inkscape provides a number of tools for drawing geometric shapes. The tools for drawing regular[11] geometric shapes (rectangles, boxes, ellipses, regular polygons, stars, and spirals) are covered here. Path (pencil and pen) tools, discussed in the next section, may be used to draw arbitrary shapes.

Current Style:  The style of an object includes attributes that determine how the inside of the shape (fill) and how the boundary path (stroke) are drawn. It also includes shape-specific attributes such as the number of points in a star. New objects are drawn with the Stile corrente. The Riempimento and Colore contorno colors as well as the Contorno thickness of the Stile corrente are shown for the shape and path tools at the right end of the Controlli Strumento.

The Rectangle Tool Controls.
The Strumento Rettangolo-Controlli Strumento showing the current Riempimento color (blue) and Contorno color (black), as well as the Contorno width (1 px).

A component of the Stile corrente is changed when that component is modified through, for example, an entry in the Controlli Strumento or the Riempimento e Contorni dialog (Oggetto Riempimento e Contorno... (Shift+Ctrl+F)) discussed in Capitolo 10, Attributes. Note that if in the Stile corrente, a star has five points, just selecting a star with six points (and even modifying its color) is not enough to change the number of points in the Stile corrente. The number of points must be explicitly changed.

By default, the strumenti forma (except the Strumento spirale and Strumento Cubo) as well as the Strumento Pennino are drawn with a global Stile corrente. Changing the style for one of these tools, changes the style for all.

Each of the shape tools can be given a fixed style by selecting the This tool's own style option under the tool's entry in the Preferenze di Inkscape dialog (File Preferenze di Inkscape... (Shift+Ctrl+P)). Clicking on the Stile corrente color swatches will open the correct section of the Preferenze di Inkscape dialog. Set the style by selecting an object with the desired style and click on the Take from selection button. The Strumento Cubo style can not be changed. (However the Strumento Cubo with the Last used style option will remember its own style.)

While drawing some objects (arcs, stars, regular polygons, and spirals), some features (such as the orientation of a polygon) can be constrained to specific angles with respect to the center of the shape and the horizontal axis. These angles are multiples of the Scatto di angolo di rotazione. The default snap angle is 15 degrees. It can be set under the Steps entry in the Preferenze di Inkscape dialog.

Shapes can be scaled, rotated, and skewed. (See Capitolo 6, Positioning and Transforming.) When doing so, a transformation is applied to the shape. The internal parameters defining the shape (such as the width and height of an ellipse) remain unchanged.[12] This is important to remember if you later modify a shape, for example, by editing the XML file directly.

[11] The Strumento Stella includes a randomization feature so that the resulting shapes are not regular. The underlying description is still based on a regular shape.

[12] This is not always true for rectangles. If the option Optimized is selected in the Store transformation section of the Transforms entry of the Preferenze di Inkscape dialog, the x, y, width, and height attributes will change rather than adding a transformation matrix for simple translating and scaling operations.