Add Shape
photopea_add_shapeAdd a vector shape layer (rectangle or ellipse) to the active document with specified bounds, fill, stroke, and name. Shapes remain editable and scalable without quality loss.
Instructions
Add a vector shape layer (rectangle or ellipse) to the active document. The shape layer becomes the active layer. Shapes are non-destructive and can be resized with transform_layer without quality loss.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| type | Yes | Shape type to create | |
| bounds | Yes | Shape bounds | |
| fillColor | No | Color as hex string (e.g. #ff0000) | |
| strokeColor | No | Color as hex string (e.g. #ff0000) | |
| strokeWidth | No | Stroke width in pixels | |
| name | No | Name for the shape layer |