Graphite: set fill, stroke or opacity of a layer
graphite_set_styleChange a vector layer's fill, stroke, width, or opacity. Only specified fields update; null removes a fill or stroke.
Instructions
Change the solid fill colour, stroke colour and width, and/or opacity of an existing layer. Only the fields given are changed; null removes a fill or stroke. Each change is one undo step. Fails with LAYER_NOT_FOUND if the id is not in the active document.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| fill | No | Hex colour #rrggbb or #rrggbbaa, or null for none. | |
| stroke | No | Stroke colour, or null to remove the stroke colour. | |
| opacity | No | Layer opacity from 0 (transparent) to 1 (opaque). | |
| layer_id | Yes | layer_id as returned by graphite_insert_svg or listed by graphite_get_document. | |
| stroke_width | No | Stroke width in document pixels (default 1 when a stroke colour is set). |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| changed | Yes | ||
| layer_id | Yes |