Found by review during #94, both pre-existing. Filed rather than folded into a rendering rung, since the second one moves committed goldens.
Both became fixable in #94: cg::GradientStop.color is now CGColor32F, which carries a stop's alpha as a float independently of its RGB bytes. Neither is fixed there.
1. crates/grida/src/import/svg/from_usvg.rs
IntoCg<GradientStop> for usvg::Stop builds the stop colour from value.color().into_cg() — always fully opaque — and discards value.opacity(). It carries a [MODEL_MISMATCH] marker for exactly this.
A translucent stop-opacity on an SVG gradient imported through the legacy path renders fully opaque. The widened leaf can now hold it via CGColor32F::from_rgb8_alpha(rgb, value.opacity().get()).
2. crates/grida/examples/golden_sk_svg_filters/main.rs
Builds stop colours with (stop.opacity().get() * 255.0) as u8 — a truncation, not a rounding, so 0.5 becomes 127/255 rather than 128/255, and any float opacity loses precision before the widening. The same from_rgb8_alpha route applies.
This one regenerates goldens, so it needs its own ledgered diff.
Found by review during #94, both pre-existing. Filed rather than folded into a rendering rung, since the second one moves committed goldens.
Both became fixable in #94:
cg::GradientStop.coloris nowCGColor32F, which carries a stop's alpha as a float independently of its RGB bytes. Neither is fixed there.1.
crates/grida/src/import/svg/from_usvg.rsIntoCg<GradientStop> for usvg::Stopbuilds the stop colour fromvalue.color().into_cg()— always fully opaque — and discardsvalue.opacity(). It carries a[MODEL_MISMATCH]marker for exactly this.A translucent
stop-opacityon an SVG gradient imported through the legacy path renders fully opaque. The widened leaf can now hold it viaCGColor32F::from_rgb8_alpha(rgb, value.opacity().get()).2.
crates/grida/examples/golden_sk_svg_filters/main.rsBuilds stop colours with
(stop.opacity().get() * 255.0) as u8— a truncation, not a rounding, so0.5becomes127/255rather than128/255, and any float opacity loses precision before the widening. The samefrom_rgb8_alpharoute applies.This one regenerates goldens, so it needs its own ledgered diff.