Map a 0..1 pressure value to a stroke width.
width(p) = minWidth + (maxWidth - minWidth) × p^gamma
Mouse / non-stylus inputs report pressure === 0 (no button) or 0.5 (button held); callers that don't want uniform 0.5-pressure widths on mouse input should gate on pointerType === 'pen' upstream and feed a constant width on the non-stylus path.
pressure === 0
0.5
pointerType === 'pen'
Map a 0..1 pressure value to a stroke width.
width(p) = minWidth + (maxWidth - minWidth) × p^gammaMouse / non-stylus inputs report
pressure === 0(no button) or0.5(button held); callers that don't want uniform 0.5-pressure widths on mouse input should gate onpointerType === 'pen'upstream and feed a constant width on the non-stylus path.