Skip to content

Vertexa Alpha 5

Latest

Choose a tag to compare

@github-actions github-actions released this 15 Oct 17:27

Pen lands where it is drawn on any tablet mapping

The pen position came from the tablet's own units stretched over the display rectangle Windows
reports. Drivers that keep the tablet's proportions or map only part of it place the pen elsewhere,
so lines landed far from the cursor. Now the whole-pixel position Windows gives is the truth; the
fine tablet units are fitted to it per axis as the pen moves (least squares) and used for sub-pixel
precision only once the fit agrees within a pixel. A changed mapping or another device starts the
fit again.

Pen positions fitted to the cursor the driver moves

Windows Ink's mapping (the positions in WM_POINTER) can differ from the one the tablet driver uses
for the cursor (several monitors, part of the tablet, kept proportions), so the line still landed away
from the cursor. The tablet's units are now fitted per axis to the cursor position while the pen
hovers (least squares, older pairs fading); until the fit has seen enough movement, the cursor
itself is used.

--pen-log: pen messages and where they land, for tablet problems

Pen strokes start where the pen touched down

The pen log showed the positions were right all along: Windows sends the pen's click some 150 ms
after the tip touches (it waits to tell a tap from a drag), and the samples before that click were
dropped, so every stroke began a long way after where it was started. The pen's samples since it
touched down are now kept and the stroke starts from them. Positions go back to Windows' pixels,
refined by the tablet units fitted to them (the cursor turned out to lag a message behind).