Previously, the duplicated layer would be placed at the top of the stack. It is now inserted one layer above the original.
---------
Co-authored-by: Ollie Dolan <olliedolan10@gmail.com>
Co-authored-by: Keavon Chambers <keavon@keavon.com>
* Nudging is now based on local pixel dimensions
* Brush tool live preview (#1116)
* Disable vector preview for brush tool
* Fix brush preview
* Fix warping
* Left and right square brackets to change size
* Add linear interpolation
* Modfiy existing selected brush layer
* Resolve warnings
---------
Co-authored-by: Dennis Kobert <dennis@kobert.dev>
Co-authored-by: Keavon Chambers <keavon@keavon.com>
* Duplicating a layer selects only new layer
* Add Ctrl+J duplicate alias hotkey
---------
Co-authored-by: 0HyperCube <78500760+0HyperCube@users.noreply.github.com>
Co-authored-by: Dennis Kobert <dennis@kobert.dev>
Co-authored-by: Keavon Chambers <keavon@keavon.com>
* Add image segmentation node
This is a node which receives as input:
- An image.
- A mask, which consists of colors that define the image segments.
Each unique color in the mask defines an area where a segmen resides.
The node generates a `Vec<ImageFrame>` where the length of the result
is the number of unique colors in the mask.
Signed-off-by: Ică Alexandru-Gabriel <alexandru@seyhanlee.com>
* Add the Index node for image segments
Since the output of the image segmentation node is a `Vec<ImageFrame>`,
we want a way to access the segments individually. The Index node receives
a `Vec<ImageFrame>` as input and an index, and returns the image found
at that index in the vec.
Signed-off-by: Ică Alexandru-Gabriel <alexandru@seyhanlee.com>
* Integrate the image segmentation and index nodes into the editor
Signed-off-by: Ică Alexandru-Gabriel <alexandru@seyhanlee.com>
* Initialize the input of the index node with an empty image frame
Signed-off-by: Ică Alexandru-Gabriel <alexandru@seyhanlee.com>
* Don't expose the parameter for the index node
Signed-off-by: Ică Alexandru-Gabriel <alexandru@seyhanlee.com>
* Don't crash the editor when the number of segments exceeds the accepted limit
Signed-off-by: Ică Alexandru-Gabriel <alexandru@seyhanlee.com>
* Print a warning in the console when the number of segments exceeds the accepted limit
Signed-off-by: Ică Alexandru-Gabriel <alexandru@seyhanlee.com>
* Add a few more checks so that the editor doesn't crash on invalid input
Signed-off-by: Ică Alexandru-Gabriel <alexandru@seyhanlee.com>
* Replace the tagged value for the index node
Signed-off-by: Ică Alexandru-Gabriel <alexandru@seyhanlee.com>
* Fix merge conflicts
---------
Signed-off-by: Ică Alexandru-Gabriel <alexandru@seyhanlee.com>
Co-authored-by: Dennis Kobert <dennis@kobert.dev>
Fix transform logic for mask node + other fixes
* Fixes the transform logic for the mask node reverting the breakage
introduced by the color pr
* Actually modifies the pixel values
* Fix storage format for images
* Export images as unassociated alpha
* Migrate Nodes to use RasterMut + Samplable
* Add Pixel trait to include serialization
* Implement traits for Color and propagate new generics
* Always convert to linear color when loading images
* Add rotate and curvature
* Fix comments
* Fix case where curve is linear
* Address comments
* Fixed breakages caused by UI updates
* Scootch rotation point to center in frame
* Code review
* Visualize t value point when segment is linear
---------
Co-authored-by: Rob Nadal <robnadal44@gmail.com>
Co-authored-by: Keavon Chambers <keavon@keavon.com>
* Intial work
* Improve miter and add round join
* Get arcs to go opposite direction
* Add cap and other refactors
* Rename joint to join, fix some bugs
* Fix single point issue
* Clean up
* Fix iframe sizes and update UI
* Address comments and handle single point outline
* Rename variables, fix branches in outline
* Address comments
* resolve NaN value when trying to change scale value from zero to other numbers
* resolve NaN value when trying to change scale value from zero to other numbers
---------
Co-authored-by: Keavon Chambers <keavon@keavon.com>
Migrated the import shortcut used in Svelte from @ to @graphite for better future package compatibility
Co-authored-by: Andre Roelofs <andreroelofsai@gmail.com>
Co-authored-by: Keavon Chambers <keavon@keavon.com>