mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2026-09-17 07:18:04 +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:
@@ -29,6 +29,7 @@ impl RenderComplexity for Graphic {
|
||||
Self::Vector(table) => table.render_complexity(),
|
||||
Self::RasterCPU(table) => table.render_complexity(),
|
||||
Self::RasterGPU(table) => table.render_complexity(),
|
||||
Self::Color(table) => table.render_complexity(),
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -52,6 +53,12 @@ impl RenderComplexity for Raster<GPU> {
|
||||
}
|
||||
}
|
||||
|
||||
impl RenderComplexity for Color {
|
||||
fn render_complexity(&self) -> usize {
|
||||
1
|
||||
}
|
||||
}
|
||||
|
||||
impl RenderComplexity for String {}
|
||||
impl RenderComplexity for bool {}
|
||||
impl RenderComplexity for f32 {}
|
||||
|
||||
Reference in New Issue
Block a user