mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2026-09-22 07:18:12 +08:00
Add Table<Gradient> as a graphical type (#3051)
This commit is contained in:
@@ -27,8 +27,15 @@ mod adjust_std {
|
||||
}
|
||||
impl Adjust<Color> for Table<Color> {
|
||||
fn adjust(&mut self, map_fn: impl Fn(&Color) -> Color) {
|
||||
for color in self.iter_mut() {
|
||||
*color.element = map_fn(color.element);
|
||||
for row in self.iter_mut() {
|
||||
*row.element = map_fn(row.element);
|
||||
}
|
||||
}
|
||||
}
|
||||
impl Adjust<Color> for Table<GradientStops> {
|
||||
fn adjust(&mut self, map_fn: impl Fn(&Color) -> Color) {
|
||||
for row in self.iter_mut() {
|
||||
row.element.adjust(&map_fn);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user