Commit Graph

18 Commits

Author SHA1 Message Date
Keavon Chambers 202b0ee6ed Remove Color struct from document-legacy (#1012) 2023-02-07 17:31:50 -08:00
Dennis Kobert 620540d7cd Incremental compilation and stable node IDs (#977)
* Generate stable node ids

* checkpoint

* Implement borrow tree

* Add eval function on borrow tree

* Refactor Node trait to fix lifetime issues

* Compiler infinite loop

* Impl compose pair

* Transition to double lifetime on trait

* Change node trait to use a generic arg for the input

* Start adapting node_macro

* Migrate more nodes to new macro

* Fix raster tests

* Port vector nodes

* Make Node trait object safe

* Fix FlatMapResultNode

* Translate most of gstd

* Fix DowncastBothNode

* Refactor node trait once again to allow for HRTB for type erased nodes

* Start working on type erased nodes

* Try getting DowncastBothNode to work

* Introduce Upcasting node + work on BorrowTree

* Make enough 'static to get the code to compile

* Transition DynamicExecutor to use borrow tree

* Make Compose Node use HRTB's

* Fix MapResultNode

* Disable blur test

* Add workaround for Composing type erased nodes

* Convert more nodes in the node_registry

* Convert more of the node_registry

* Add update tree fn and hook up to frontend

* Fix blur node

* Implement CacheNode

* Make frontend use graph compiler

* Fix document_node_types type declaration for most nodes

* Remove unused imports

* Move comment down

* Reuse nodes via borrow tree

* Deprecate trait based value in favor of TaggedValue

* Remove unsafe code in buffer creation

* Fix blur node

* Fix stable node id generation

* Fix types for Image adjustment document nodes

* Fix Imaginate Node

* Remove unused imports

* Remove log

* Fix off by one error

* Remove macro generated imaginate node entry

* Create parameterized add node

* Fix test case

* Remove link from layer_panel.rs

* Fix formatting
2023-02-07 20:06:24 +01:00
Keavon Chambers beab0f01c6 Refactor font_cache into render_data; delete image layer type 2023-01-29 20:31:14 -08:00
Keavon Chambers d990110f63 Apply lints and cleanup to Rust code 2023-01-29 03:01:57 -08:00
Brendan Allan 5388b59e97 Groundwork for integrating Specta (#949)
* add derive(specta::Type)

* use specta from git

* introduce Uuid type

* remove unnecessary specta::Type

* document export_types test

* upgrade Specta
The previous Specta branch had some hacks that were just for this project. They have all been converted into proper features so they can be merged into main.

* remove some unnecessary specta::Type uses

* add MessageDiscriminantDef explanation

* manually export types with specta

* rename 'specta.rs' to 'export_types.rs'

* rename 'export_types' to 'generate_ts_types'

---------

Co-authored-by: Oscar Beaumont <oscar@otbeaumont.me>
2023-01-28 22:29:38 -08:00
kadir e0146d57f7 Update UI when deleting last point of shape with Path tool (#979)
* Added new DocumentResponse variant

* Update Operation::DeleteSelectedManipulatorPoints to update Layer Tree by delegating deletion to Operation::DeleteLayer. Also emits Operation::DeletedSelectedManipulatorPoints to let editor clear Properties panel

* Update process_message() to deal with new DocumentResponse::DeletedSelectedManipulatorPoints match case. When this DocumentResponse is emitted, it clears the Properties panel.

* Added Display trait implementation for DocumentResponse::DeletedSelectedManipulatorPoints. Updated imports in document_message_handler.rs to get the correct types for messages emitted from DocumentResponse::DeletedSelectedManipulatorPoints match case in process_message().

* Removed useless import. Capitalized comments for style consistency.

* Updated messages emitted to clear Properties panel by emitting LayoutMessage::SendLayout's instead, which update the backend widget state

* Revert inclusion of unused imports

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2023-01-28 18:32:31 -05:00
0HyperCube 64e62699fc Replace the image layer type with an Image node (#948)
* Use builder pattern for widgets

* Arguments to new function

* Add node graph when dragging in image

* Fix duplicate import

* Skip processing under node graph frame if unused

* Reduce node graph rerenders

* DUPLICATE ALL frontend changes into other frontend

* DUPLICATE more changes to another frontend

* Code review

* Allow importing SVG files as bitmaps

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2023-01-27 10:01:09 +00:00
Keavon Chambers 66e8325362 Update project readme and MSRV 2023-01-24 01:33:30 -08:00
Oliver Davies 0019340096 Remove additional boolean for mirroring distance (#965)
Removed the additional boolean for mirroring distance
2023-01-13 15:00:20 -08:00
0HyperCube 2a27471363 Fix boolean crash with self intersecting shape (#952) 2023-01-09 02:25:06 +00:00
locriacyber 1a6ee7c542 Remove direct dependency on ttf_parser (#947)
Because ttf_parser updated, rustybuzz was using an older version.
2023-01-07 16:40:59 +00:00
0hypercube 8e9d097fcc Fix accidental 'not' when checking for redraw 2023-01-03 18:24:02 +00:00
0HyperCube cd8a897b96 Don't show the blue outline when bloburl is set (#937) 2023-01-03 10:05:46 +00:00
0HyperCube 7cc1a192cb Fix viewport culling with nested layers (#939)
* Fix viewport culling with nested layers

* Clean up naming
2023-01-02 15:27:11 +00:00
0HyperCube 6e142627a3 Fix a derivative causing NaNs in boolean ops (#934)
* Fix a derivative causing NaNs

* Better error messages around boolean ops

* Tweak error dialog wording

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2023-01-01 08:54:10 +00:00
0HyperCube 0d703e857b Gradient tool improvements (#927)
* Reuse existing gradient

* Double click to insert gradient stop

* Add history states to the gradient tool

* Do trig in viewport space so it is actually perpendicular

* Sync tool options with active gradient

* Deleting points with delete key

* More tolerance on inserting points
2022-12-29 20:00:58 +00:00
0HyperCube 750ef06cba Add a 'Preserve Aspect Ratio' checkbox to Properties panel (#923)
* Add the link button

* Transform around pivot

* Remove log

* Fix tests

* Add a hacky two-line layout for the checkbox

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2022-12-28 23:21:03 +00:00
Keavon Chambers 49b9b8cfec Rename the legacy Graphene crate to document-legacy (#899)
* Rename /graphene to /document-legacy

* Update names in code
2022-12-22 02:12:05 -08:00