11.1 Shape Tools

A new shape object is created by dragging on the canvas with the corresponding tool—for example, dragging with the Rectangle tool creates a new rectangle. The newly created shape remains selected, and any selected shape displays its editing handles (similar to the gradient handles). By dragging those handles, you can immediately edit what you have created.

Most handles work differently when you drag them with or without various keyboard modifiers (, , ). When you hover your mouse over a handle, the status bar tells you what this handle will do when dragged or clicked with different modifiers.

Like most other tools, shape tools have certain object selection capabilities. In any shape tool, you can select an object by clicking, which works as -clicking does with the Selector tool (i.e., ignores any grouping, 5.10 Selecting in Groups). -click (select under, 5.9 Selecting Objects from Underneath) also works; deselects.

-click (add to selection or remove from selection) also works in shape tools, but is less useful because, currently, shape editing handles are only shown when a single shape is selected; multiple selected shapes are not editable by handles. This may be fixed in future versions of Inkscape.

It’s not that you can only edit, for example, a rectangle in the Rectangle tool. All types of shapes display, and let you drag, their shape-specific handles in any shape tool, as well as in the Node tool ().

Numeric parameters of the selected shape—or, if none is selected, the parameters that will be used for newly created shapes—are accessible in the controls bar (2.3 Interface Overview) of each shape tool. Usually, there are a few numeric entry fields and toggle buttons there, as well as a button to reset the values to the defaults (this button is placed after all other controls on the right).

Any changes made to these controls are remembered and used for the next object you draw with that tool, in the same way that the style properties you assign to an object are typically used for the next created object (11.1.2 The Style of New Shapes). For example, after you change the number of corners of a star, new stars you’re drawing will have the same number of corners.

Moreover, even simply selecting a shape sends its parameters to the controls bar, where these parameters are remembered and later used for newly created shapes of this type. This makes it easy to reuse the shape parameters in a way similar to pasting styles from object to object (8.1 Style Fundamentals), but without using copy and paste at all. For example, if you have in your drawing a slightly rounded star with nine corners and no randomization, simply selecting that star is sufficient for subsequent stars to be created with exactly the same parameters.

What style will be used for the next shape you create? You can always get an answer to this question by looking at the far right end of the controls bar. All shape tools—and, in fact, all object-creating tools—have a style swatch there displaying the fill, stroke, and opacity that will be used for the newly created objects:

By default, all shape tools except Spiral use the last set style as the style of new objects they create. This means that every time you change some style property in an object, Inkscape remembers this property and will use it for new shapes. For example, after you paint something green, all new rectangles, ellipses, stars, and so on will come up the same shade of green. Or, if you assigned 3 px stroke width with 1:1 dash pattern to some path or shape, new shapes will also have this stroke style. (This behavior becomes more complex for 3D boxes, which use not one but six different styles for the six sides of a box; see 11.3.5 Styling for details.)

If you don’t like the idea of using the most recently set style for new objects, you can change that. Double-click a shape tool’s button in the toolbox on the left; this opens that tool’s page in the Inkscape Preferences dialog (3.1.1 Inkscape Preferences). There, a two-way switch for the style of new objects can be either the last used style or a fixed tool style specific to this tool. In the latter case, you can press the Take from selection button to remember the style of the current selection as the tool’s fixed style.

For example, if you want all your rectangles to always come up black without stroke, select some black strokeless object, go to Inkscape Preferences, switch the Rectangle tool to using its own style, and click Take from selection.