Inkscape’s Star and Polygon tool can create stars and other multi-sided polygons.
The number of corners (or points) and the spoke ratio can be edited making it possible to create some very complex-looking objects; yet still, each one is a single object.
Select the Star/Polygon Tool
from the main Toolbox along the left side of the window (keyboard shortcuts * or SHIFTF9)
Hold the primary mouse button and drag the mouse over the canvas until the desired size or shape is achieved. Then release the mouse button.
Unlike rectangles and ellipses, stars are drawn from their center point, where you make your first click. The outer vertex of the star is where you release the mouse button.
While dragging, you can hold these modifier keys to constrain the star/polygon:
Hold the CtrlCmd key while dragging the vertex (outer handle), to force the star/polygon to rotate in 15° steps. Otherwise, it rotates freely. (See Rotation snap angle)
By default the star or polygon will display the current style, which is the last style applied to any object.
Alternatively, tools can be configured to draw in their own unique style. This behavior can be changed on a tool by tool basis in Inkscape PreferencesEdit ‣ Preferences ‣ Tools ‣ Shapes ‣ Star/Polygon tool.
(Right-click the Star/Polygon tool icon/button or use the keyboard shortcut CtrlCmdShiftP to open Preferences dialog.)
The color of the star or polygon can be changed by:
clicking on a color in the palette (Use Click to set the fill color, and ShiftClick to set the stroke color.)
When the Star tool is enabled, the object will display diamond-shaped modification handle(s).
The star has two modification handles - the tip handle (outer vertex) and the base handle (inner vertex).
Dragging either handle alters the Edge length and Spoke Ratio (values on the Star tool controls bar).
The base handle can be dragged past the center point to create some very complex star designs. However, such complex designs are not remembered for subsequent stars.
To identify a handle, hover your mouse over it, and look at the Status bar.
Hold the CtrlCmd key while dragging the Base handle, to constrain it’s movement along radial lines passing through the star’s center, and positioned halfway between adjacent vertex tips.
Hold the Shift key while dragging either handle to adjust the rounding of the corners.
Drag the base handle over the center point to see extreme rounding. Drag perpendicular to that for more gradual rounding.
Type a minus sign into the Rounded field for another design.
Hold the AltOption key while dragging either handle to adjust the randomization setting. For best results, drag perpendicular to the radial direction.
Additional stars drawn will inherit not only the fill and stroke but also Corners, Stroke Ratio (positive value only), Rounded and Randomized.
You can Clickdrag the center x handle to move the star’s position, without having to switch to the Selection tool.
Note
While the randomize parameter has the same distortion for any individual star,
different stars have their own randomize seed value, so no two stars have the same distortion for a given randomize parameter number.
Duplicates and clones, however, inherit the same seed value from the original.
Adjusting a star’s or polygon’s handles or parameters can create a vast array of interesting patterns, ranging from chaos to multi-faceted order. We can only say “Have fun!”
A variety of star shapes. Those in the blue square produced by entering values in the control bar entry fields. Those in the red square produced with mouse adjustments of the modification handles.¶
Tip
When you have created a complex star, try changing the Fill Rule (in the Fill and Stroke dialog) to achieve different patterns or variations.
As opposed to stars, polygons only have one diamond-shaped handle. Adjusting it can resize and/or rotate the polygon.
Hold the CtrlCmd key while dragging the handle to constrain it to resizing only.
Hold the Shift key while dragging to adjust the rounding of the corners.
Hold the AltOption key while dragging to create randomization.
Warning
If a star object is changed to a polygon object (via tool controls bar, e.g.
),
both handles will remain, but the base handle will not be adjustable.
If that polygon is deselected and reselected, the base handle will disappear.
Similarly, a polygon converted to a star object will be missing the base handle.
But if the star object is deselected and reselected, both handles will once again be visible.
Modify a star or polygon object with keyboard shortcuts¶
The cursor (arrow) keys can be used to move selected handles horizontally and vertically.
Press the AltOption key + an arrow key for small adjustments. Zoom in for even finer adjustments.
Press the Shift key + an arrow key for large adjustments.
Adjustments made with the arrow keys fail to update the XML. And the value in the Spoke Ratio field, on the Tool Controls bar fails to change.
Work arounds:
Switch to the Selection tool
. Move the star or polygon object one arrow keypress out.
Then press the opposite arrow to move it back by one keypress. This causes both the Spoke Ratio field and the XML file to be updated.
With a star or polygon selected the [ or ] keys will rotate it in 15° steps.
The < (,) or > (.) keys will resize the object smaller or larger (See Transforms with keyboard).
Note
With multiple objects selected, the keys will rotate and resize around the center of the selection area.
In Inkscape, the Star tool utilizes Sodipodi attributes to define star shapes,
particularly for parameters like the number of points, inner and outer radii,
and rounding of corners. These parameters are stored using XML attributes
prefixed with sodipodi: and inkscape: within the Inkscape SVG code.
When the SVG is loaded into Inkscape these attributes are used to regenerate the SVG path d=”” attributes.
If it is exported as Plain SVG only the path will be saved (same as if it were converted from Object to Path).
If the same SVG is now reloaded into Inkscape, the star object will no longer be editable using the Star/Polygon tool.