fix: Surface pen pressure, zoom glitches, sticky notes, selection UX
All checks were successful
CI / Windows build (push) Successful in 8m19s
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:
@@ -142,13 +142,15 @@ const Map<BrushKind, BrushProfile> kBrushPresets = {
|
||||
kind: BrushKind.fountainPen,
|
||||
baseWidthFraction: 0.006,
|
||||
pressureGamma: 2.0,
|
||||
pfThinning: 0.9,
|
||||
pfStreamline: 0.45,
|
||||
pfSmoothing: 0.55,
|
||||
// Was 0.9 — too aggressive on short CJK strokes (width collapses mid-glyph).
|
||||
pfThinning: 0.65,
|
||||
pfStreamline: 0.4,
|
||||
pfSmoothing: 0.5,
|
||||
simulatePressure: false,
|
||||
capStart: true,
|
||||
capEnd: true,
|
||||
taper: true,
|
||||
// Light taper only; full taper made Chinese characters look frayed.
|
||||
taper: false,
|
||||
opacity: 1.0,
|
||||
blendMultiply: false,
|
||||
),
|
||||
|
||||
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user