Introduce the new brush stroke data types (#4467)

* Add the brush stroke format types

* Route brush strokes through the node graph

* Store brush style as per-item attributes instead of a struct
This commit is contained in:
Timon
2026-08-27 15:19:01 +00:00
committed by GitHub
parent 96cc520c4b
commit 10256dd22c
19 changed files with 317 additions and 6 deletions
@@ -494,6 +494,15 @@ impl TableItemLayout for Artboard {
}
}
impl TableItemLayout for graphene_std::brush::Stroke {
fn type_name() -> &'static str {
"Stroke"
}
fn identifier(&self) -> String {
format!("Stroke ({} {})", self.len(), if self.len() == 1 { "sample" } else { "samples" })
}
}
impl TableItemLayout for DashPattern {
fn type_name() -> &'static str {
"DashPattern"
@@ -607,6 +616,7 @@ impl TableItemLayout for Graphic {
Self::ColorList(list) => list.identifier(),
Self::GradientList(list) => list.identifier(),
Self::TextList(list) => list.identifier(),
Self::StrokeList(list) => list.identifier(),
}
}
// Don't put a breadcrumb for Graphic
@@ -631,6 +641,7 @@ impl TableItemLayout for Graphic {
Self::ColorList(list) => list.layout_with_breadcrumb(data),
Self::GradientList(list) => list.layout_with_breadcrumb(data),
Self::TextList(list) => list.layout_with_breadcrumb(data),
Self::StrokeList(list) => list.layout_with_breadcrumb(data),
}
}
}