Files
AniCraft/docs
Rob CoenenandClaude Opus 5.5 8d2c3008c2 feat(fla): decode curved shapes, gradients and strokes into library symbols
A CPicShape body holds the full matrix (a-d 16.16, tx/ty i32 twips), the
edge count, fill styles (solid; linear and radial gradients with matrix,
focal point and stops), stroke styles (width, cap, join, miter) and edge
records. Each record's flag byte packs four 2-bit fields - move, control,
anchor, style - whose codes pick the point storage (i16 or i32 in 1/256
twip, i16 in 1/2 twip), all relative to the pen; a control point makes a
quadratic curve. Fill regions are rebuilt per style as the XFL importer
does.

Fixes the straight-edge unit: edges are half-twips, not half-pixels, so
shapes were drawn 20x too large ('UFO mask' is 10.9 x 11.2 px).

Verified differentially against the Animate twins: all 3197 shape bodies
found in the 9 legacy corpus files (2201 curved) match their XFL edges,
styles and matrices; 244 library symbols now carry artwork. Unsupported
records (bitmap fills, unknown kinds) are skipped whole and counted.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-21 15:31:19 +01:00
..