mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2026-09-15 22:28:10 +08:00
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:
committed by
Dennis Kobert
parent
8d4f1346a1
commit
d5e31c23bb
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user