mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2026-09-23 04:58:13 +08:00
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:
@@ -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),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user