design_fill_region
Creates a painting fill layer that procedurally generates hatch, crosshatch, stipple, scumble, or contour marks within a bounded region, with optional spatial shading.
Instructions
Create a painting:fill layer that procedurally generates marks (hatch, crosshatch, stipple, scumble, or contour) within a bounded region, with optional spatial shading. Use preset names as shorthand: hatch-light, hatch-medium, hatch-dense, crosshatch-light, crosshatch-dense, stipple-light, stipple-dense, scumble, contour.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| x | No | Layer x position on canvas. | |
| y | No | Layer y position on canvas. | |
| seed | No | PRNG seed for deterministic generation (default: 42). | |
| size | No | Brush size override in pixels (default: 4). | |
| brush | No | Inline custom BrushDefinition (overrides brushId). Must include 'id' and 'name'. | |
| color | No | Stroke color as hex (default: "#000000"). | |
| index | No | Layer stack position (default: top). | |
| width | No | Layer width on canvas. | |
| height | No | Layer height on canvas. | |
| region | No | Region to fill. Types: {"type":"bounds"} (default, fills layer bounds), {"type":"rect","x":N,"y":N,"width":N,"height":N}, {"type":"ellipse","cx":N,"cy":N,"rx":N,"ry":N}, {"type":"polygon","points":[{"x":N,"y":N},...]}. | |
| brushId | No | Brush preset ID (default: "ink-pen"). | |
| layerId | No | Update an existing painting:fill layer. If omitted, creates a new one. | |
| opacity | No | Layer opacity 0–1 (default: 1.0). | |
| shading | No | Shading function (default: {"type":"uniform"}). Types: {"type":"linear","angle":0,"range":[0.2,1.0]}, {"type":"radial","cx":0.5,"cy":0.5,"range":[0.0,1.0]}, {"type":"noise","seed":0,"scale":1,"range":[0.3,1.0]}. cx/cy are normalised [0,1] in region space. | |
| strategy | No | Fill strategy object or preset name. Preset names: hatch-light, hatch-medium, hatch-dense, crosshatch-light, crosshatch-dense, stipple-light, stipple-dense, scumble, contour. Objects: {"type":"hatch","angle":45,"spacing":8}, {"type":"crosshatch","angles":[45,135],"spacing":8,"passDecay":0.7}, {"type":"stipple","density":40,"distribution":"poisson"}, {"type":"scumble","density":15,"strokeLength":20,"curvature":0.5}, {"type":"contour","spacing":8,"smoothing":0.3}. | |
| layerName | No | Name for the new layer (default: 'Fill'). | |
| shadingAffects | No | Which properties shading modulates (default: ["density"]). |