Commit Graph
7 Commits
Author SHA1 Message Date
BFlat c709840ae0 Merge pull request #1782 from AxylumRust/fix/vectordrawable-manual-range-contains
fix(vectordrawable): M2.1: use inclusive range checks
2026-11-07 12:11:56 +08:00
BFlat c429490086 Merge pull request #1933 from storytold/fix/sec-vectordrawable-warning-names
perf(vectordrawable): keep warning names in a set
2026-11-07 11:41:27 +08:00
Dylan M. Taylor 3c7bae6a04 perf(vectordrawable): resume each repeated name's suffix search where it stopped (#1964)
* perf(vectordrawable): resume each repeated name's suffix search where it stopped

* address review: continue from a longer stem when the name suffix counter is exhausted
2026-11-03 22:59:53 -05:00
Dylan M. Taylor a9e66d2de9 perf(vectordrawable): keep warning names in a set
Each affected layer name was checked against every name already kept for
the warning, quadratic in the number of distinct names although only three
are ever shown. A set holds the distinct names; the first three stay in
order.
2026-11-03 04:24:32 +00:00
Cédric Legrand cda326e24e fix(vectordrawable): M2.1: use inclusive range checks 2026-11-01 20:23:24 +01:00
NetterSilverandClaude Haiku 5.5 d3bde76baf Clamp Vector Drawable numbers to the f32 range so they stay finite
Found while testing crates/vectordrawable/src/xml.rs:22 (num), reached via stroke_attrs at :189

Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-27 06:04:47 +00:00
Filip Strajnar 8b5441eb84 M6: figcraft-vectordrawable: an Android Vector Drawable writer
A new L4 crate that writes layers as an Android Vector Drawable (XML):
shapes, booleans and text as baked path data, solid and gradient fills
(linear, radial and sweep, exact for any handle frame via a group and a
2x2 SVD), native strokes where Android draws them the same and filled
stroke outlines otherwise, clip frames and masks as <clip-path> groups.

What a drawable can't hold is governed by Compat (bestEffort / exact /
ignore): layer opacity over overlapping shapes, even-odd fills and clips
(rewritten to non-zero via pathops), diamond gradients, alpha masks;
effects, image and pattern fills and blend modes are left out with a
warning. Output is pretty-printed, numbers are finite and short, names
(android:name) are optional, escaped and unique.
2026-10-18 20:24:19 +02:00