Rectangle tool
The Rectangle tool draws a rectangle by dragging from one corner to the opposite corner. The new rectangle takes the current fill and stroke (a white fill and a black 1 px stroke, until they are changed) and has square corners. It stays selected with its frame and four corner widgets, and the Rectangle tool stays in hand.
Where to find it
The Rectangle tool is the fourth button on Layout’s floating toolbar. Press M to pick it.
How to draw a rectangle
- Press M, or click Rectangle on the toolbar.
- Press on the page at one corner.
- Drag to the opposite corner and release.
How to draw a square
- With the Rectangle tool in hand, start dragging a rectangle.
- Hold Shift. Width and height stay equal.
How to draw from the centre
- With the Rectangle tool in hand, hold Alt.
- Press where the centre goes, and drag.
How to round the corners while drawing
- Start dragging a rectangle.
- Press Up arrow to add 1 to the corner radius. Press Down arrow to take 1 away.
- Press Left arrow for square corners. Press Right arrow for the largest radius the rectangle allows. It is kept while you keep resizing.
- Release. The radius you set is used for the next rectangle too.
How to move the rectangle while drawing
- Start dragging a rectangle.
- Hold Space and move the pointer. The rectangle moves and keeps its size.
- Let go of Space and keep dragging to size it again.
How to leave copies while drawing
- Start dragging a rectangle.
- Hold ~ (the key left of 1). A copy is left at every step of the drag, up to 500.
- Release. All the copies and the rectangle are committed together.
How to round the corners after drawing
- Draw a rectangle. Four round widgets appear near its corners.
- Drag a widget to round the corners.
Options
| Control | What it does | Values | Default |
|---|---|---|---|
| (none) | The Rectangle tool has no option bar and no dialog in Layout. | The corner radius of the next rectangle is 0, unless you set it with the arrow keys while drawing. |
Keys
| Keys | When | What happens |
|---|---|---|
| M | Not typing | Picks the Rectangle tool |
| Shift | While dragging | Draws a square |
| Alt | While dragging | Draws from the centre |
| Space | While dragging | Moves the rectangle being drawn |
| ~ (Backquote) | While dragging | Leaves a copy at every step |
| Up / Down arrow | While dragging | Corner radius plus or minus 1 |
| Left arrow | While dragging | Square corners |
| Right arrow | While dragging | Largest corner radius |
| Escape | While dragging | Cancels the rectangle |
Limits
- A click without a drag on an empty page draws nothing and opens nothing in Layout.
- A click on an existing object with the Rectangle tool opens that object’s edit handles instead of drawing. A click on a text does nothing.
- A rectangle whose width or height is 0 is not added.
- The corner radius starts at 0. The radius you set with the arrow keys becomes the next rectangle’s.
- While you drag, the arrow keys belong to the drag. They do not nudge anything then.
- The fill and stroke come from the current style: the last colours, width, dash, cap and join set with nothing selected.
- While snapping is on, the press point snaps.