Skip to content

Interface: StrokeContext

Defined in: pencil.ts:165

What an adaptive mode would get to look at. Populated from the opening of a stroke (and, once auto is real, updated as it develops).

It is deliberately not the raw sample list: an adaptive resolver that can see everything will end up depending on everything, and this is a seam we want to stay narrow. Speed, size, and how flat the pen is being held are the signals a human would use to tell writing from sketching at a glance, and they are almost certainly enough.

Properties

altitude

altitude: number

Defined in: pencil.ts:171

Mean altitude so far, radians. A laid-over pen is sketching.


extent

extent: number

Defined in: pencil.ts:169

Diagonal of the stroke's bounding box so far, px. Letters are small.


speed

speed: number

Defined in: pencil.ts:167

Mean speed so far, px/ms.