Rename spread method to gradient spread so it matches the other gradient attribute names (#4404)

* Rename spread method to gradient spread so it matches the other gradient attribute names

* Keep the legacy gradient struct's spread method field name matching its on-disk key
This commit is contained in:
Keavon Chambers
2026-08-04 05:15:21 -07:00
committed by Dennis Kobert
parent 8d4f1346a1
commit d5e31c23bb
23 changed files with 245 additions and 240 deletions

View File

@@ -23,13 +23,13 @@ fn gradient_map<T: Adjust<Color> + Clone + Send + Sync + core_types::CacheHash +
if gradient.is_empty() {
return image;
}
let spread_method = gradient.lane(0).attr::<vector_types::markers::SpreadMethod>();
let gradient_spread = gradient.lane(0).attr::<vector_types::markers::GradientSpread>();
let gradient = gradient.element_ref(0);
image.adjust(|color| {
let intensity = color.luminance_rec_709();
let intensity = if reverse { 1. - intensity } else { intensity };
gradient.evaluate(intensity as f64, spread_method)
gradient.evaluate(intensity as f64, gradient_spread)
});
image