fix: Surface pen pressure, zoom glitches, sticky notes, selection UX
All checks were successful
CI / Windows build (push) Successful in 8m19s

Wire Win32 pressure into Dart, tighten pinch guards, use geometric shape
strokes, expand the ink palette, and replace scratch-link split view with
an on-page sticky that shares the sidecar repo.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-08-05 19:52:15 +08:00
parent 198da00ecd
commit 4a6fe7d05e
16 changed files with 621 additions and 171 deletions

View File

@@ -13,6 +13,7 @@ import 'dart:math' as math;
import '../canvas/editor_tool.dart';
import '../canvas/pen_stroke.dart';
import 'brush.dart';
/// Number of points sampled around an ellipse. Kept as a const so tests can pin
/// it (spec: "ellipse = sampled points ~48"). The polyline is closed, so the
@@ -23,6 +24,10 @@ const int kEllipseSamples = 48;
/// width (no pressure taper for geometric shapes).
const double _kShapePressure = 1.0;
/// Geometric shapes must NOT inherit fountain thinning/taper — force a near-
/// constant-width brush so line/rect/ellipse look like ruler ink.
const BrushKind kShapeBrush = BrushKind.ballpoint;
/// Generate the normalized polyline for [kind] spanning [start] → [end].
///
/// * [ShapeKind.line] → 2 points.