Skip to main content

Draw and insert a polygon

You can use a grid to draw your own polygon shape in draw.io and add it to the drawing canvas.

Select Arrange > Insert > Polygon from the menu.

Draw the polygon​

  • Click on the grid to add a point. You need a minimum of three points for a closed polygon.
  • To draw a non-closed polygon, deselect the Close Path checkbox at the bottom of the dialog.
  • Drag points to new positions in the grid.
  • Deselect Grid at the bottom of the dialog if you want to work without a grid.
    You can insert note shapes via Arrange > Insert > Note in draw.io

The co-ordinates of each point of the polygon will appear in a list on the right

  • Drag them into a new position in the list using the left horizontal line icon.
  • Click on the trash icon to the right of any point to delete it.
  • Make the line between two points into an arc by selecting the checkbox next to the co-ordinate. Drag the orange arc points to increase or decrease the curvature.
    Turn a straight edge of a polygon into an arc

At the bottom left of the dialog, you can Undo and Redo changes, Zoom In and Zoom Out, and start over when you click Delete All

Once you have finished drawing your polygon, click Apply to add it to the drawing canvas.
You can insert note shapes via Arrange > Insert > Note in draw.io

Draw a polygon on the drawing canvas​

You can also draw a polygon directly on the drawing canvas with the Freehand panel.

  1. Open the Freehand panel: press X, select Arrange > Insert > Freehand, or click the Freehand tool in the toolbar.
  2. Select Polygon in the drop-down list, then click Start Drawing if you are not drawing yet.
  3. Draw the polygon:
    • Click to add a corner. Press and drag to draw a freehand section.
    • Click on the first point to close the polygon. Double-click or press Enter to finish a polygon that is not closed.
    • Press Backspace to remove the last point.
    • Hold Shift to draw the next line in 45° steps. Hold Alt to place a corner without snapping it to the grid.

You can keep drawing polygons until you stop drawing. Press Escape to discard the polygon you are drawing, then press Escape again, click Stop Drawing or close the Freehand panel to stop. The colour button in the panel sets the line colour of new polygons.

The polygon is added to your diagram as a polygon shape, so you can edit it in the polygon editor like a polygon drawn in the dialog.

Edit an existing polygon​

Right-click on the polygon shape to open it in the polygon editor. Alternatively, select the polygon, then select Edit > Polygon from the menu.

Note: this only works with polygons drawn in this polygon editor.