Commit 64ff405
committed
Use area-based stroke scaling for ink resize
Replace the previous min-based uniform scale with an area-based stroke scaling to make side-handle resizes reversible. Compute separate width/height scales with safety guards against zero dimensions, derive strokeScale via sqrt(widthScale*heightScale), and remove integer rounding when computing newStrokeWidth (still clamped to a minimum of 1). Adds explanatory comment and avoids division-by-zero by using Math.max on denominators.1 parent e2563ef commit 64ff405
1 file changed
Lines changed: 6 additions & 5 deletions
Lines changed: 6 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
48 | 48 | | |
49 | 49 | | |
50 | 50 | | |
51 | | - | |
52 | | - | |
53 | | - | |
54 | | - | |
55 | | - | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
56 | 57 | | |
57 | 58 | | |
58 | 59 | | |
| |||
0 commit comments