Skip to main content

Module ink

Module ink 

Source
Expand description

Deterministic ink materials and pressure-sensitive drawing.

Structs§

BrushStroke
Pressure-sensitive pen stroke, recorded as nonzero path fills. This is the single brush implementation: BrushStroke::new captures the defaults of a fixed-angle elliptical nib and BrushStrokeBuilder refines them (pressure curves, caps, bristles, ink, timing). A built stroke is immutable; its baked material is cached on the stroke alone, and write reveals share that cache.
BrushStrokeBuilder
Configures a BrushStroke; build validates it and returns the immutable stroke.
BrushTiming
Stateless arc timing with a monotone progress curve and pauses between subpaths.
Ink
A deterministic ink material for strokes and even-odd path fills.
InkFill
Bounded ink fill. Kurbo flattens the original contours; signed boundary distance and the existing Ink material kernel produce a RGBA texture. The texture includes feathering and is emitted as one rectangle fill. The Paint (a color, gradient or pattern) colors each texel before material attenuation. At most 4096 edges, 262144 texels and 32 million edge/texel evaluations are accepted. Paper is sampled in paper space and there is no fluid simulation, as for BrushStroke. Stroke-only ink effects are ignored; see Ink.
InputSample
One recorded pen sample. Time is relative to the first input sample.
PigmentPainting
Immutable opt-in pigment composition, shared by CPU/GPU as one baked material.
StrokeFont
Bounded single-line Latin lettering built from original segment geometry.

Enums§

BrushCap
Analytic pressure treatment at the endpoints of a variable-width BrushStroke.
BrushPreset
Composable brush geometry/material presets; all settings remain overridable on the returned builder.
NibMode
Per-sample nib orientation for explicitly extended strokes.
Paper
The sheet an Ink is absorbed into, set with Ink::paper.
PigmentMix
Optional color mixing approximation, separate from renderer blend modes.