mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2026-09-15 22:28:10 +08:00
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:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user