* refactor
* impl find_spline function
* impl merge_layers() to merge two spline layer to one spline layer
* impl merging spline to another spline which are not in the same layer
* impl merging of spline with path
* impl merge spline start endpoint and last endpoint
* fix naming
* fix handle transformation
* refactor
* fix merging with path with only one segment
* refactor
---------
Co-authored-by: Keavon Chambers <keavon@keavon.com>
* Fixed Pen extension having collienar handles
* Reformat a little
* handles being colinear for GRS
---------
Co-authored-by: Keavon Chambers <keavon@keavon.com>
* Fix mouse states and priority order of operation
* Add metadata for tampered transform
* Add comments explaining details
* Improve comments
* Move out of bounds checks into rotate check
---------
Co-authored-by: Keavon Chambers <keavon@keavon.com>
* Fix self-chaining of transforms and compass rose under single layer
13406328461340608972
* When not invertible transformation, do nothing
* Fix overlays and compass control when can't be visible
* Simplify selection logic in compass states
* Show compass only if it was possible that it could be seen before dragging
* Prevent resizing line objects
* Code review
---------
Co-authored-by: Keavon Chambers <keavon@keavon.com>
* pen tool feature and other minor fixes
* ctrl done,need to improve handle_modifications
* completes collinear and ctrl for all cases,need to refactor
* more bug fix need to refactor
* fixed minor issues and refactor done
* Code review
* minor bug fixes
---------
Co-authored-by: Keavon Chambers <keavon@keavon.com>
* Rotate pivot and squares to orient along quad
* Add compass rose UI
* Add compass rose functionality
* Refactor code and polish things
* Fix UI
* Fix crash
* More polish
* Rework arrow to use different selection method
* Adjust for rotated layer and show when within cage
* Don't show when other modes are possible
* Fix glitchy compass
* fixes
* fixes
* WIP separate pivot and compass rose (not compiling)
* Complete file moving fixes
* Code review
---------
Co-authored-by: Keavon Chambers <keavon@keavon.com>
* write document upgrade code to transfrom Spline node into Path -> Spline from Points
* fix only connecting to single output
* shift position of newly inserted Path -> Spline from Points node
* refactor
* remove all old Spline node code
* rename Spline from Points node to Spline
* Code cleanup
* Update the demo art to natively use the new Spline node
---------
Co-authored-by: Keavon Chambers <keavon@keavon.com>
* Path tool only show frontier overlays
* Implemented all modes for pen and path tool
* Fixed formatting issue
* Changes in selection behaviour of handles
* Selection toggle only on drag not click
* Changed comment
* Code review
---------
Co-authored-by: Keavon Chambers <keavon@keavon.com>
* Remove color input outline; reduce antialiasing compositing artifacts in color widgets
* Rename ColorButton to ColorInput
* Add features and aborting to several other widgets
- Prevent Esc from closing parent floating menus when aborting
- Fix missing icon regression
- Gutter resizing abort
- Color picker aborts, Shift axis alignment, improve click/drag behavior for gradient spectrum
- Scrollbar abort, repeat when held, fix directional arrows when viewport is zoomed
- Number input abort, repeat when held
* Move ColorInput into the inputs folder
* Fix tiny logo
* Further polishing of G/R/S visualisation and features
Followup to #2229.
* Begin typing only if constrained or not in G
* Prevent adding empty group in R mode. Order fn alphabetically as was before
* Always show typing hints unless can't begin typing
* Fix one frame bug
* Add cancel and confirm groups for GRS hints
* Fix inconsistency in call increments, snaps
* Use top/bottom left/right methods with quads where more readable
* Fix inconsistent use of narrow/flat
* Add hints to transform cage
Fixes 9392658955.
* Rename some hints
* Fix scale radial behaviour, grab constraints and local edge orientation
* Fix not being able to remove the whole selection with delete modifier
Fixes 1336221441.
* Fix compiling
* Fix crash when single point bbox
Fixes#2267
* Fix the same crash in scale and use better name for bbox
* cargo fmt
---------
Co-authored-by: Keavon Chambers <keavon@keavon.com>
* move merge_layers function to graph_modification_utils
* merge_layer before segment insertion
* Tidying up
---------
Co-authored-by: Keavon Chambers <keavon@keavon.com>
* make Fsm update_hints function borrow tool_data and update individual tool implementations accordingly, use tool_data in select_tool update_hints function as well as add a UpdateHints response when the pointer moves after the change from DragStart to Dragging state
* Also add for selection box drawing
* Code review
---------
Co-authored-by: Keavon Chambers <keavon@keavon.com>
* add document method to check intersection and insideness with polygon
* impl lasso selection
* impl lasso select to always add to selection
* add hint for lasso selection
* fix calculating selection mode based on direction on each pointer move
* fix lasso polygon lagging behing mouse position
* add overlay to draw lasso polygon with fill color same as quad
* fix comment
* change removing from selection key binding from Sift + Ctrl to just Alt
* impl Alt to shrink selection for quad in path tool
* refactor rename SelectionType to SelectionShape
* impl lasso overlay for path tool
* impl selecting anchors and handles intersection lasso in path tool
* add keys hint info
* fix converting lasso polygon to closed subpath which is has less than two points
* Code review
* impl preferences-based selection mode to the Path tool for only for overlays,
---------
Co-authored-by: Keavon Chambers <keavon@keavon.com>
* Change the pivot behaviour when resizing bounds with alt in the select tool
* Add scale factor maximum
* Fix bug when encountering snapping; tidy up and comment the code
---------
Co-authored-by: Keavon Chambers <keavon@keavon.com>
* Fix GRS overlays bugs
- [ ] Another change: when typing values, we shouldn't round the number to 2 decimal places, instead it should show the exact number the user types, including trailing zeros if the user types those.
- [ ] For Scale, the solid vs. dashed line that follows the cursor is following the projected location of the cursor onto that line. It should not be doing that, instead it should be displaying the actual scale ratio. 0 means at the center. 1 means at the starting point of the Sscale. 0.5 means half is solid, half is dashed. Notice in my video below, I'm able to make the solid line's end go all the way to the center, which should occur at a scale factor of 0, without ever having the scale factor even go below 0.5. Because currently the two values aren't related. Furthermore, this is necessary to visualize snapping when Ctrl is pressed and to properly handle slowing when Shift is pressed.
https://files.keavon.com/-/QuirkyYummyGrayfox/capture_38_.mp4
- [ ] Implement integer-value snapping for Grab when Ctrl is pressed? It should work whether we're freely moving or constrained to X or Y (but still mouse controlled; Ctrl doesn't affect typed numbers). So when Ctrl is held, we shouldn't see decimal values. You'll need to zoom in past 100% to see decimal values.
- [ ] We don't enter G, R, or S mode until after pressing one of those keys and then moving the mouse cursor. It should happen immediately upon pressing the key, before needing to move the cursor.
- [ ] The hints need to be updated to work dynamically with the state of global vs. local X and Y constraint, and include - negation, numbers, and Backspace if numbers are typed.
- [ ] In the Path tool, we actually do want the Rotation to start from the direction of the cursor rather than the local rotation of the layer. So if you can undo that change specifically for the Path tool, but keep it for the Select tool, that would be ideal.
- [ ] When G is constrained to Y in both Path and Select tools, the number label shouldn't swap sides based on moving the mouse left and right offset by the pivot-to-start-point X offset distance. Alternatively, you could keep this behavior but make it swap to the side that the mouse is currently on (removing the pivot-to-start-point X offset from the current mouse position). When solving this, just be sure you don't break the correct behavior for G when unconstrained to an axis, since we like how the Y component label swaps sides. Please also double-check that you're not drawing any extra (overlapping) overlay lines than the necessary 1 when in X or Y constraint mode, or when X or Y happen to be precisely 0. https://files.keavon.com/-/EachWeeArcticseal/capture_39_.mp4
- [ ] Remove the bottom-left viewport overlay labels for the G/R/S status
* Remove bottomleft GRS overlay
* Fix backspace minus
* Implement integer-value snapping for Grab when Ctrl
* Use built-in coordinates for translation
* Show the exact value in Typing including trailing zeros
* Make rotation overlay start along the cursor rather than the local rotation of the layer in path tool
* Properly handle slow down and other effects on scale
* Start the transformation overlay immediately rather than after first change
* Hints for typing and global/local axes
* Prevent drawing overlapping if X or Y is 0
* Fix number being replaced by - when in negated transformation
* Fix fixes
* Invert scale delta in inverted mode
* Code review
---------
Co-authored-by: Keavon Chambers <keavon@keavon.com>
* Changes rotation handles to be around overlay squares
Fixes 1330785941
* Fix zero width objects not being selected by slightly nudging the transform
* Follow the categorical limits to render overlay quads
As discussed here: 1331166336
* Replace area based calculations with edge based calculations
* Fix 3rd category vis
* Code review
* Add missing powi(2)
* Fixes to handle logic
* Remove single axis prioritisation
* Explicitly check for distance to find nearest handle
* Replace threshold check based on corner vis bounds
* Fix discrepancy at h=12px
* Allow grab when box is too small by disabling resizing within bounds
* Replace inside resize pixel limit
* Code review
---------
Co-authored-by: Keavon Chambers <keavon@keavon.com>
* Use the identity matrix as the default for an image frame
* Fix all usages to be equivalent to their pre-refactor versions, opting to keep ZERO not IDENTITY as the default image size
---------
Co-authored-by: Keavon Chambers <keavon@keavon.com>