New node: Solidify Stroke (#1650)

* added struct and registered fill from stroke node. not functional yet.

* properly registered new node

* finished fill-from-stroke feature. works on both closed and open shapes. supports line caps and line joins.

* fixed import issues and miter limit handling

* fix outline function. use both subpaths for solid shapes now

* code quality improvements

* use radius instead of diameter, functionality not yet working for shapes as transform is not properly applied before calculating new shapes.

* Updated to follow new VectorData structure. Fully functional.

* fix repeat node

* remove comment

* add a test, remove unused code.
This commit is contained in:
Roshan P
2024-03-11 17:19:29 -07:00
committed by GitHub
parent c3a886116a
commit 2263b0ab89
4 changed files with 85 additions and 4 deletions
@@ -2617,6 +2617,15 @@ fn static_nodes() -> Vec<DocumentNodeDefinition> {
properties: node_properties::node_no_properties,
..Default::default()
},
DocumentNodeDefinition {
name: "Solidify Stroke",
category: "Vector",
implementation: DocumentNodeImplementation::proto("graphene_core::vector::SolidifyStrokeNode"),
inputs: vec![DocumentInputType::value("Vector Data", TaggedValue::VectorData(graphene_core::vector::VectorData::empty()), true)],
outputs: vec![DocumentOutputType::new("Vector", FrontendGraphDataType::Subpath)],
properties: node_properties::node_no_properties,
..Default::default()
},
DocumentNodeDefinition {
name: "Repeat",
category: "Vector",