# Shapes Tool

The Shapes tool is a general-purpose filled-shape drawing tool for the canvas. It replaces the old Rectangle tool and adds four shape modes under a single toolbar button:

- **Rect**
- **Oval**
- **Polygon**
- **Freehand**

You can activate the Shapes tool from the canvas toolbar or with the default hotkey `U`.

## Where Shapes Draws

Shapes always draws into the **active raster target**:
- On a regular raster layer, Shapes adds filled pixels to that layer.
- On an active inpaint mask layer, Shapes draws directly into the mask.
- Rect and Oval respect the canvas **Clip Strokes to Bbox** behavior setting. When enabled, any part of the shape outside the current generation bounding box is clipped.

## Common Behavior

- Shapes preview live while you draw.
- The fill color uses the current active color.
- On a raster layer, the active color’s alpha is respected when adding pixels.
- Hold `Ctrl` on Windows/Linux or `Cmd` on macOS to switch to **subtractive** mode and cut pixels out of the active layer.
- In subtractive mode, alpha is ignored and the shape fully clears pixels.
- Press `Esc` to cancel the current shape session.

## Transparency Lock

When **Transparency Lock** is enabled on the active raster layer, Shapes respects it:
- Added shapes only affect pixels that already have opacity on the layer.
- Fully transparent areas stay transparent.
- This applies to **Rect**, **Oval**, **Polygon**, and **Freehand** shapes.
- Subtractive mode still clears pixels from the active layer.

Use this when you want filled shapes to recolor, shade, or mask existing painted content without spilling into empty transparent regions of the layer.

## Shape Modes

### Rect

Drag to draw a rectangle. Hold `Shift` to constrain to a square. Hold `Alt` to draw from the center instead of from a corner.

### Oval

Drag to draw an ellipse. Hold `Shift` to constrain to a perfect circle. Hold `Alt` to draw from the center.

### Polygon

Click to place vertices. Click the first point to close and commit the shape. Hold `Shift` to snap the pending edge to horizontal, vertical, and 45 degree angles.

### Freehand

Click and drag to sketch a filled freehand contour. Release the pointer to commit the shape.

## Moving and Panning During Drawing

The Shapes tool supports different `Space` behavior depending on the current mode:
- **Rect / Oval:** While still dragging, hold `Space` to move the uncommitted shape instead of resizing it. Release `Space` to continue resizing.
- **Polygon / Freehand:** Hold `Space` during an active session to pan the viewport without discarding the unfinished shape. This is especially useful when drawing large shapes that extend beyond the current viewport.

## Color Picking While Using Shapes

The `Alt` key behaves differently depending on the active Shapes mode:
- **Rect / Oval:** Before you start dragging, `Alt` can be used for the temporary color-picker quick-switch. Once a drag is active, `Alt` is reserved for drawing from the center.
- **Polygon:**  `Alt` remains available for the temporary color-picker quick-switch between vertex placements.
- **Freehand:**  `Alt` is available before the stroke starts, but not during an active stroke.

## Practical Examples

- Use **Rect** or **Oval** to quickly add clean filled regions.
- Use **Polygon** when you need straight edges and deliberate corner placement.
- Use **Freehand** for irregular organic regions.
- Use **subtractive mode** to cut holes back out of an existing filled region.

## Summary

The Shapes tool is the fastest way to add filled geometric or freeform regions to canvas layers. Use it for structured fills, mask authoring, and precise subtractive edits without switching away from the current raster target.
