fix: soft-clamp pinch zoom and Krita-inspired brush opacity
All checks were successful
CI / Windows build (push) Successful in 10m28s

Hard SDROP avalanches froze lastRaw while zoom still crawled; soft-clamp
and re-anchor instead. Ballpoint is near-solid, pencil uses soft √p without
multiply stacking; PDF ink falls back to nearest page during zoom settle.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-08-05 20:51:15 +08:00
parent 2b1c6ba7e0
commit 4f6fb69dee
7 changed files with 267 additions and 136 deletions

View File

@@ -57,12 +57,13 @@ void main() {
expect(b.opacity, lessThan(1.0));
});
test('pencil — Sqrt (√p), moderate thinning 0.5, scratchy streamline', () {
test('pencil — Sqrt (√p), moderate thinning, soft streamline', () {
final b = brushProfileFor(BrushKind.pencil);
expect(b.pressureGamma, 0.5); // rnote Sqrt / √p
expect(b.pfThinning, 0.5);
expect(b.pfStreamline, 0.4);
expect(b.pfThinning, 0.45);
expect(b.pfStreamline, 0.35);
expect(b.taper, isFalse);
expect(b.blendMultiply, isFalse);
});
});