GraphiteEditor / Graphite

2D vector & raster editor that melds traditional layers & tools with a modern node-based, non-destructive, procedural workflow.
https://graphite.rs
Apache License 2.0
7.31k stars 387 forks source link

New node: Solidify Stroke #1650

Closed Kakapio closed 3 months ago

Kakapio commented 4 months ago

This node can be added after a stroke node in a set of vector data. Upon doing so, it will account for the stroke's shape and add it to the vector data. The stroke will be treated as a solid part of the shape or line segment. Both closed shapes and line segments are supported.

Closes #1092

Keavon commented 3 months ago

Welcome, thanks for the contribution!

It looks like this does not currently compile.

Kakapio commented 3 months ago

Welcome, thanks for the contribution!

It looks like this does not currently compile.

Sorry, had a missing import. Should compile now.

Keavon commented 3 months ago

!build

github-actions[bot] commented 3 months ago
📦 Build Complete for 7acb60880412a0ce05e2ebf00b2b25217a096a3c
https://4c3f345c.graphite.pages.dev
Kakapio commented 3 months ago

I think I have noticed an issue where even for a closed vector shape the node assumes it's an open shape and uses the wrong vectordata....looking into this. One of my local files didn't have this issue, but new ones do. Strange.

Kakapio commented 3 months ago

resolved an issue. fully functional now. please rebuild.

otdavies commented 3 months ago

!build

github-actions[bot] commented 3 months ago
📦 Build Complete for 1a74ff6d3ef4703277b2d980b899386b5e2cb017
https://3457cc2d.graphite.pages.dev
Keavon commented 3 months ago

!build

github-actions[bot] commented 3 months ago
📦 Build Complete for 52e722417d26e0819ad8f970c3f6b4b5f7de691d
https://b573b226.graphite.pages.dev
Keavon commented 3 months ago

Can you please rename this to "Solidify Stroke"?

Also, the stroke width doesn't seem to be the same. Is it perhaps being doubled (diameter being treated as radius)?

otdavies commented 3 months ago

!build

github-actions[bot] commented 3 months ago
📦 Build Complete for 17ba1ba7a99cd1d943628245b479490bcfde6387
https://2e18b657.graphite.pages.dev
Keavon commented 3 months ago

!build

github-actions[bot] commented 3 months ago
📦 Build Complete for 7eac88e2bc4fc2c71a600996edda3cba0714d3aa
https://069a2d94.graphite.pages.dev
Keavon commented 3 months ago

There's one bug I found, but I'm not sure if it's caused by your code: a layer with a shape and a non-1x1 transform, when you have it selected and switch to the Path tool, changes in size to gain a 1x1 transform. I'm probably just going to merge this anyways and we can work on a followup fix.

@0HyperCube do you know if that's a general bug or if that's because this node is doing (or not doing) something special?