• A line width scaled by pointer pressure. Pressure 0.5, which a mouse reports while a button is down, returns baseWidth unchanged, so a stroke drawn without a pen is the width the user configured. A pen sweeps the width from baseWidth * (1 - range) at no pressure to baseWidth * (1 + range) at full pressure. Pressure and range are clamped to 0..1, and a pressure that is not a number (a synthetic event) counts as 0.5.

    Parameters

    • baseWidth: number
    • pressure: number
    • range: number = 0.6

    Returns number