Path Sample
One sample along a freehand pen stroke.
The required fields (position, width) are what the OSS renderer consumes. The optional fields are nullable so unit-pressure / mouse / touch strokes carry zero overhead and serialize cleanly:
tilt — pen altitude angle in degrees,
0.0= perpendicular to the screen,90.0= parallel. Reported by Apple Pencil and S Pen. Consumed by tilt-aware brush renderers (Pro). OSS renders without it.azimuth — pen rotation around its own axis in degrees,
0.0..360.0. Reported by Apple Pencil. Drives calligraphy-style brush orientation in tilt-aware renderers. OSS renders without it.
Velocity is intentionally NOT stored — it is derivable from position deltas between successive samples and Element.modifiedAt; storing it would duplicate data the renderer can compute on demand.
Properties
Functions
Encode a Element.PathSample as a comma-separated string. Chosen over a JSON-object form to keep PEN strokes (which can have thousands of samples) small on the wire.