draw_shapes
Draw anti-aliased vector primitives, lines, curves, rectangles, ellipses, polygons, and text onto a Krita paint layer to build ordered geometric artwork.
Instructions
Draw vector-style primitives (anti-aliased) onto a paint layer, in order (max 5000 per call).
Every shape has "type" and optional "opacity" (0..1). Types:
line {x1,y1,x2,y2,color,stroke_width}
polyline {points:[[x,y],...],color,stroke_width}
bezier {points:[start, c1,c2,end, c1,c2,end ...],color,stroke_width} (1+3n points)
rect {x,y,width,height,radius?,fill?,stroke?,stroke_width?,gradient?}
ellipse {cx,cy,rx,ry,fill?,stroke?,stroke_width?,gradient?}
polygon {points:[[x,y],...],fill?,stroke?,stroke_width?,gradient?}
text {x,y,text,size(px),font?,bold?,color} (x,y = baseline-left)
For closed shapes color is the fill when neither fill nor stroke is given.
gradient: {"type":"linear","x1","y1","x2","y2","stops":[[0,"#fff"],[1,"#000"]]} or
{"type":"radial","cx","cy","r","stops":[...]}.
layer = id or name of a paint layer (default: active layer).
These are crisp geometric shapes; for painterly marks use brush_stroke.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| layer | No | ||
| shapes | Yes |