Skip to content

v0.6.0

Latest

Choose a tag to compare

@TheSevenPens TheSevenPens released this 13 Sep 01:07
· 18 commits to main since this release
895a76d

Six bugs a review found that 229 passing tests could not, a tenth self-test check, and a clean build.

The review

MainWindow.axaml.cs was the largest file here at 1464 lines. Cursor reviewed it as role:code-reviewer, briefed and reporting entirely through #46. Six findings, all six fixed.

Five of the six live in event handlers, which the 229 tests passing at the time never entered.

Loading a preset did not invalidate stroke caches, so undo replayed a stroke under a stale curve #53
A recording's metadata was whatever was true at stop, not at capture — switching pen API mid-recording wrote the new device's pressure range over samples scaled to the old one #55
Renaming a preset onto a name already in use looked like it succeeded #56
Save-as-PNG failed silently where Copy reported the failure #57
The App position readout formatted away the precision the conversion goes out of its way to preserve #54
Dismissing the driver tip was undone by collapsing the ribbon #58

Twelve unit tests were added where a seam existed. The other three fixes were clicked through, two of them against a stashed-fix baseline so the check was known to be able to fail.

Three of the six are the same fault: something shaped like information that cannot carry any. A readout formatted below the precision it exists to show, a save reporting neither success nor failure, and a dismissal recording nothing for the next reader.

--selftest reports 10/10

L3.origin-tracks-window is wired in (#59). It moves the window, converts a fixed desktop point before and after, and fails when the conversion does not follow — the only check that can see a canvas origin read once and cached. No other check can: the replay positions its input relative to the origin the application reports and subtracts the same value back off, so a wrong origin cancels itself exactly.

The conversion handed to it re-reads the window origin on every call, because that is what RenderTimer_Tick does for every pen point. Passing the origin captured for the other checks would have reported a stale value belonging to the self test rather than to the input path.

Verified by reintroducing the fault deliberately: 9/10 passed, reporting the injected displacement exactly, with a process exit code of 1.

This application does not have the fault. That was not known before; nobody had looked, and no check would have said.

Avalonia 12 and a clean build

Avalonia 12.1.2 with its backends named explicitly, and both remaining obsoletions moved off (#60), so the build now carries no warnings.

Bitmap.Save(Stream, int?) was the one worth care rather than a mechanical rename — it is on the export path and the int? was quality. PngBitmapEncoderOptions.Default carries CompressionLevel.Optimal, and a chart exported before and after the change is byte-identical: 3778 bytes, same SHA-256.

The Raw readout

RawX/RawY mean four different things across WinPenKit's backends, and on the Avalonia path they mean nothing at all — as of WinPenKit v0.10.0 those fields are zero rather than a truncated copy of the desktop position. This readout asks the session and shows the unit, or -- where there is none (#61). Printing the pair alone read as a position in the same space as Screen, which it never was.

Requires

WinPenKit v0.10.0 or later, for IPenSession.Conventions.