QuickShape
Draw a rough shape, hold still, and it snaps into a clean one you can still adjust.
Draw, then hold still
Draw the shape roughly. At the end, keep the mouse button down and stop moving. After a moment (1.5 seconds by default) the stroke snaps into a clean line, arc, polyline, ellipse, circle, rectangle, square, quad or triangle, whichever matches what you drew. Still holding, move the mouse to resize or turn it; hold Shift for a perfect circle or square that turns in 15° steps.
Here’s one of each, drawn by hand with the Square brush and held still: a line, an arc, a square, a triangle, an ellipse, and a circle held with Shift. With Square, shapes keep sharp, pointed corners and flat-cut ends; with a round brush the same corners come out rounded.
Adjust it
When you let go, a bar at the top names the shape. Click Edit Shape for handles: drag a dot to reshape it, or drag the line to move the whole shape. The bar also switches between related shapes: Ellipse and Circle, Rectangle, Square and Quad, or a Triangle and an equal-sided one (Equal). Ctrl/⌘ Z steps back through your edits.
Finish
Click anywhere off the shape, start a new stroke, change tool or press Done, and the shape becomes ordinary paint. A shape stays on the part you drew it on.
Not snapping? Check Snap to shapes in Settings → Painting. Shape hold time there sets how long you hold, from 0.5 to 3 seconds.