Implement dynamic table attributes to generalize the graphic-specific Table type (#4050)

* Feature-gate serde derives behind cfg_attr in all runtime node graph type crates

* Refactor Table to move its hard-coded fields into an attributes field

* Encapsulate TableRow/TableRowRef/TableRowMut attribute fields behind accessor methods

* Remove TaggedValue::GraphicUnused

* Refactor Table<T> to use dynamic attributes instead fixed names

* Fix code review soundness concerns

* Add todo work

* Replace row-oriented Table<T> API with column-oriented access

* Fix attribute propagation bugs

---------
This commit is contained in:
Keavon Chambers
2026-04-28 02:10:24 -07:00
parent 324b9e664c
commit 76938eb69a
75 changed files with 2330 additions and 1349 deletions

View File

@@ -21,12 +21,12 @@ async fn gradient_map<T: Adjust<Color>>(
gradient: Table<GradientStops>,
reverse: bool,
) -> T {
let Some(row) = gradient.get(0) else { return image };
let Some(gradient) = gradient.element(0) else { return image };
image.adjust(|color| {
let intensity = color.luminance_srgb();
let intensity = if reverse { 1. - intensity } else { intensity };
row.element.evaluate(intensity as f64).to_linear_srgb()
gradient.evaluate(intensity as f64).to_linear_srgb()
});
image