Implement the Brush tool (#1099)

* Implement Brush Node

* Add color Input

* Add VectorPointsNode

* Add Erase Node

* Adapt compilation infrastructure to allow non Image Frame inputs

* Remove debug output from TransformNode

* Fix transform calculation

* Fix Blending by making the brush texture use associated alpha

* Code improvements and UX polish

* Rename Opacity to Flow

* Add erase option to brush node + fix freehand tool

* Fix crash

* Revert erase implementation

* Fix flattening id calculation

* Fix some transformation issues

* Fix changing the pivot location

* Fix vector data modify bounds

* Minor fn name cleanup

* Fix some tests

* Fix tests

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
Co-authored-by: hypercube <0hypercube@gmail.com>
This commit is contained in:
Dennis Kobert
2023-04-11 10:35:21 +02:00
committed by Keavon Chambers
parent 758f757775
commit 589ff9a2d3
36 changed files with 1527 additions and 406 deletions

View File

@@ -12,7 +12,7 @@ license = "MIT OR Apache-2.0"
std = ["dyn-any", "dyn-any/std", "alloc", "glam/std", "specta"]
default = ["async", "serde", "kurbo", "log", "std"]
log = ["dep:log"]
serde = ["dep:serde", "glam/serde"]
serde = ["dep:serde", "glam/serde", "bezier-rs/serde"]
gpu = ["spirv-std", "bytemuck", "glam/bytemuck", "dyn-any", "glam/libm"]
async = ["async-trait", "alloc"]
nightly = []
@@ -20,13 +20,18 @@ alloc = ["dyn-any", "bezier-rs", "once_cell"]
type_id_logging = []
[dependencies]
dyn-any = {path = "../../libraries/dyn-any", features = ["derive", "glam"], optional = true, default-features = false }
dyn-any = { path = "../../libraries/dyn-any", features = [
"derive",
"glam",
], optional = true, default-features = false }
spirv-std = { version = "0.5", features = ["glam"] , optional = true}
bytemuck = {version = "1.8", features = ["derive"], optional = true}
async-trait = {version = "0.1", optional = true}
serde = {version = "1.0", features = ["derive"], optional = true, default-features = false }
log = {version = "0.4", optional = true}
spirv-std = { version = "0.5", features = ["glam"], optional = true }
bytemuck = { version = "1.8", features = ["derive"], optional = true }
async-trait = { version = "0.1", optional = true }
serde = { version = "1.0", features = [
"derive",
], optional = true, default-features = false }
log = { version = "0.4", optional = true }
bezier-rs = { path = "../../libraries/bezier-rs", optional = true }
kurbo = { git = "https://github.com/linebender/kurbo.git", features = [
@@ -34,8 +39,10 @@ kurbo = { git = "https://github.com/linebender/kurbo.git", features = [
], optional = true }
rand_chacha = "0.3.1"
spin = "0.9.2"
glam = { version = "^0.22", default-features = false, features = ["scalar-math"]}
node-macro = {path = "../node-macro"}
glam = { version = "^0.22", default-features = false, features = [
"scalar-math",
] }
node-macro = { path = "../node-macro" }
specta.workspace = true
specta.optional = true
once_cell = { version = "1.17.0", default-features = false, optional = true }