Node / Raster Batch Output · guide
Path2D draw & custom lines
Current Apexify.js 6.0.0 documentation for Path2D draw & custom lines.
Tutorial-style chapters (field-by-field CustomOptions, scenes) live under Lines & connectors. Below: painter.path2d API (path/path2d-creator.ts, apex-painter/path-custom-lines.ts).
create(commands)
Returns a native Path2D from PathCommand[] (foundation/path-cmd.ts / types/pathCommands.ts mirror).
draw(canvasBuffer, path, options?)
Rasterizes stroke / fill / shadow / transform onto CanvasResults | Buffer. path may be Path2D or PathCommand[] (built internally).
Path2DDrawOptions (types/path2d-draw.ts): stroke, fill, shadow (supports shadow.gradient), opacity, globalCompositeOperation, transform (translateX** / translateY, rotate (degrees), scaleX / scaleY, originX / originY pivot).
Returns Promise<Buffer> (PNG).
custom(options | options[], buffer)
Decorative connectors (smooth / bezier, arrows, markers, dashed / textured lineStyle — CustomOptions types/path).
Pipeline with chain
Pipe createCanvas → path2d.custom using 'current':
Command reference
PathCommand variants (moveTo, lineTo, arc, ellipse, roundedRect, polygon, star, arrow, closePath, …): authoritative builder lib-next/foundation/path-cmd.ts (**also types/pathCommands.ts).

