mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2026-09-21 21:28:11 +08:00
Convert the raster std and adjustments families to element kernels and keep the unit primary's slot
This commit is contained in:
@@ -19,9 +19,14 @@ mod adjust_std {
|
||||
impl Adjust<Color> for List<Raster<CPU>> {
|
||||
fn adjust(&mut self, map_fn: impl Fn(&Color) -> Color) {
|
||||
for element in self.iter_element_values_mut() {
|
||||
for color in element.data_mut().data.iter_mut() {
|
||||
*color = map_fn(color);
|
||||
}
|
||||
element.adjust(&map_fn);
|
||||
}
|
||||
}
|
||||
}
|
||||
impl Adjust<Color> for Raster<CPU> {
|
||||
fn adjust(&mut self, map_fn: impl Fn(&Color) -> Color) {
|
||||
for color in self.data_mut().data.iter_mut() {
|
||||
*color = map_fn(color);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user