Fills
Fills
In pattapatta, a fill is stroke mark-making inside a region — not solid CSS/SVG paint. Emit with fill="none" and a visible stroke. See Pen-plotter output.
Typical pipeline: construct → operate → fill → SVG.
Primary fills
| Module | Marks |
|---|---|
| hatch | Parallel or cross hatch strokes |
| circlePacking | Circles packed in a region |
| segmentSet | Low-level hatch building blocks |
import { createRect, hatchParallel, segmentsToOpenPaths } from 'pattapatta'
const region = createRect(15, 15, 70, 70)
const strokes = segmentsToOpenPaths(
hatchParallel(region, { spacing: 6, angle: Math.PI / 4 }),
) Also fill-like
| Module | Marks |
|---|---|
| tiling | Cell boundaries as stroke patterns |
| contour | Offset curves (inward / outward) |
Try it
Chained recipes on Examples; interactive hatch and packing under Live demos.