Add Table<Gradient> as a graphical type (#3051)

This commit is contained in:
Keavon Chambers
2025-08-13 01:42:51 -07:00
committed by GitHub
parent 1b351aca76
commit bdc029c692
33 changed files with 689 additions and 573 deletions
+9 -2
View File
@@ -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);
}
}
}