#813: masks round their corners (rounded rectangle masks)

Problem: Premiere 26's redesigned mask tools give rectangle masks
rounded corners; FilmCraft masks only had sharp corners.

Fix: MaskPath::with_rounded_corners replaces each sharp corner between
straight edges by a circular fillet (two vertices joined by a cubic arc,
handles 4/3·tan(φ/4)·r, shrunk to fit half of each edge; hostile radii
and indices are clamped or ignored). masks.add takes `cornerRadius` for
a rounded rectangle, and the new masks.roundCorners command rounds an
existing mask's corners (or the listed vertices) in one undo step, on
every Mask Path keyframe so animated paths keep interpolating.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
vangel76
2026-10-11 00:47:09 +02:00
co-authored by Claude Opus 5.5
parent 4a81aa1742
commit 16493a7f70
5 changed files with 253 additions and 9 deletions
+2 -1
View File
@@ -529,7 +529,8 @@ with different vertex counts hold). Feather, Opacity and Expansion are ordinary
- **GPU.** `filmcraft-gpu::GpuMask` evaluates the same coverage and mix in WGSL (compute), tested
to agree with the CPU within 3·10⁻⁶. Layers with masks are CPU-rendered images in frame plans.
- **Editing.** `masks.*` commands (add / remove / set / moveVertex / translate / addVertex /
removeVertex / toggleVertexSmooth / select / list); keyframe commands take `"mask": n`. The
removeVertex / toggleVertexSmooth / roundCorners / select / list; `masks.add` takes a
`cornerRadius` for a rounded rectangle); keyframe commands take `"mask": n`. The
Program monitor overlay drags vertices, Bézier handles, the whole mask and the feather /
expansion handles; drags merge into one undo step.
- **Tracking** (`render::track`, `masks.track`): Shi–Tomasi features inside the mask, pyramidal