Add Table<Color> as a graphical type (#3033)

* Reduce code duplication in bounding box impls on Table

* Working Table<Color> rendering in the graph

* Implement color and fix other rendering with Vello and polish
This commit is contained in:
Keavon Chambers
2025-08-10 01:34:33 -07:00
committed by GitHub
parent 81abfe147a
commit 2f4aef34e5
24 changed files with 462 additions and 198 deletions

View File

@@ -280,6 +280,21 @@ fn flatten_vector(graphic_table: &Table<Graphic>) -> Table<Vector> {
unioned.into_iter().collect::<Vec<_>>()
}
Graphic::Color(color) => color
.into_iter()
.map(|row| {
let mut element = Vector::default();
element.style.set_fill(Fill::Solid(row.element));
element.style.set_stroke_transform(DAffine2::IDENTITY);
TableRow {
element,
transform: row.transform,
alpha_blending: row.alpha_blending,
source_node_id: row.source_node_id,
}
})
.collect::<Vec<_>>(),
}
})
.collect()