* add function to calculate if a subpath is inside polygon
* make is_subpath_inside_polygon() flexible
* obtimize is_subpath_inside_polygon function
* move is_inside_subpath function to Subpath struct method
* add interactive demo for subpath insideness
* Code review
---------
Co-authored-by: Keavon Chambers <keavon@keavon.com>
* Make progress in text tool
* Add line_width to gcore and gstd
* minor fix
* Dragging sets line_width correctly
* Get draw overlay to work
* Typo fix
* Make progress in text tool
* Add line_width to gcore and gstd
* minor fix
* Dragging sets line_width correctly
* Get draw overlay to work
* Typo fix
* Improve text bounding box
* Add toggle for editing line width
* Take absolute value of drag
* Fix optional properties
* Code review
* Attempt to add box height and abort with keys
* Attempt to add key modifiers and snap manager
* Use resize for improved dragging
* Refactor typesetting configuration into a struct
* Fix missing px unit in frontend
* Remove lines on rendered text
* Fix backwards compatibility
* Refactor lenient slection as an associate function in tool data
* Add dashed quad to text nodes
* Use correct names for max height and width
* Additional renames and reorder
* ReResolve conflict
* Code review and improvements
---------
Co-authored-by: hypercube <0hypercube@gmail.com>
Co-authored-by: Keavon Chambers <keavon@keavon.com>
* properties panel remains active when user edits text layer
* Keep text layers selected after editing
* Update editor/src/messages/portfolio/document/document_message_handler.rs
* Delete Empty Text Layer on Escape or Right Click
* Fix: delete empty text layer on right click
---------
Co-authored-by: Keavon Chambers <keavon@keavon.com>
* added snap and lock angle to path tool
* fixed breakage of `tab` and `space` functionality
- Previous implementation broke functionality of using Tab to swap the being-dragged handle to its opposing handle, Now fixed.
- Previous implementation broke functionality of using space to drag the manipulator group (anchor + handles) while dragging a handle, Now fixed.
* fixed the angle snapping and locking when used together
Now, if `shift` is used to snap to a 15° increment, then `ctrl` is used to preserve the angle, releasing the `shift` key will still preserve the angle.
* Fix snapping angle logic
* Improve transforms
* added functionality for `alt` key
Now, temporarily converts selected handles to colinear if they are not already colinear.
* Revert "added functionality for `alt` key"
This reverts commit f12ba6fdbf261291ced0e042a2dfe12cddd2f9e8.
* Code review
---------
Co-authored-by: hypercube <0hypercube@gmail.com>
Co-authored-by: Keavon Chambers <keavon@keavon.com>
* Fix text selection
* Remove old implementation
* minor change
* Use inbuilt function instead of helper
* Code review
---------
Co-authored-by: Keavon Chambers <keavon@keavon.com>
* Tidy up number text alignment and decimal precision for quick measurement overlays
* Tidy up number text alignment and decimal precision for quick measurement overlays
* Tidy up number text alignment and decimal precision for quick measurement overlays
* Tidy up number text alignment and decimal precision for quick measurement overlays
* Tidy up number text alignment and decimal precision for quick measurement overlays
* Tidy up number text alignment and decimal precision for quick measurement overlays
* Tidy up number text alignment and decimal precision for quick measurement overlays
* Tidy up number text alignment and decimal precision for quick measurement overlays
* Formatting changes
---------
Co-authored-by: Keavon Chambers <keavon@keavon.com>
* Implement deselect on single-click and select all anchors on double-click
* fixed the single_click_behaviour
* fix flipSmoothSharp when doubleclick and drag
* Cleanup and Clippy fixes
---------
Co-authored-by: Keavon Chambers <keavon@keavon.com>
* setup single edge crossing handling for quick measure tool
* Setup quick measure functionality for intersecting objects and handle centerline cases for non intersecting objects.
* setup single edge crossing handling for quick measure tool
* Setup quick measure functionality for intersecting objects and handle centerline cases for non intersecting objects.
* Setup quick measure functionality for intersecting objects and handle centerline cases for non intersecting objects.
* Setup quick measure functionality for intersecting objects and handle centerline cases for non intersecting objects.
* Setup quick measure functionality for intersecting objects and handle centerline cases for non intersecting objects. Add a dashed_line_with_pattern function that gives more granular control over dash_width and gap_width.
* Setup quick measure functionality for intersecting objects and handle centerline cases for non intersecting objects. Add a dashed_line_with_pattern function that gives more granular control over dash_width and gap_width.
* Setup quick measure functionality for intersecting objects and handle centerline cases for non intersecting objects. Add a dashed_line_with_pattern function that gives more granular control over dash_width and gap_width.
* Setup quick measure functionality for intersecting objects and handle centerline cases for non intersecting objects. Add a dashed_line_with_pattern function that gives more granular control over dash_width and gap_width.
* Nit picks
* Define wrapper for Overlay_context line method
* Comments and consolidating lines of code
---------
Co-authored-by: Keavon Chambers <keavon@keavon.com>
* place new layer from basic tools within an artboard bounds
Signed-off-by: James Ryans <james.ryans2012@gmail.com>
* add for Text Tool
Signed-off-by: James Ryans <james.ryans2012@gmail.com>
* use click_xray function
Signed-off-by: James Ryans <james.ryans2012@gmail.com>
* support for freehand tool
Signed-off-by: James Ryans <james.ryans2012@gmail.com>
* support spline tool
Signed-off-by: James Ryans <james.ryans2012@gmail.com>
---------
Signed-off-by: James Ryans <james.ryans2012@gmail.com>
* Selection history when creating a new layer
* fixed selection history
* cleaned up the code, removed duplicate network_metadata calls
* re: fixed selection history
Added a default value for selection_undo_history to make sure its never actually empty.
* 2115 IP
* Initial implementation of Expression node
* Register Expression Node
* Add Expression DocumentNode Definition
* DocumentNodeImplementation::Expresssion in guess_type_from_node
* Move expression.rs to graphene-core
* WIP: Investigating 'exposed' & 'value_source' params for Expression property
* Node graph render debug IP
* Single input can change node properties; complex debug IP
* Fix epsilon in test
* Handle invalid expressions in expression_node by returning 0.0
* Run cargo fmt
* Set the default expression to "1 + 1"
* Hardcode the A and B inputs at Keavon's request
* Rename and clean up UX
* Move into ops.rs
---------
Co-authored-by: hypercube <0hypercube@gmail.com>
Co-authored-by: Keavon Chambers <keavon@keavon.com>
* start of parser
* ops forgot
* reorder files and work on executer
* start of parser
* ops forgot
* reorder files and work on executer
* Cleanup and fix tests
* Integrate into the editor
* added unit checking at parse time
* fix tests
* fix issues
* fix editor intergration
* update pest grammer to support units
* units should be working, need to set up tests to know
* make unit type store exponants as i32
* remove scale, insted just multiply the literal by the scale
* unit now contains empty unit,remove options
* add more tests and implement almost all unary operators
* add evaluation context and variables
* function calling, api might be refined later
* add constants, change function call to not be as built into the parser
and add tests
* add function definitions
* remove meval
* remove raw-rs from workspace
* add support for numberless units
* fix unit handleing logic, add some "unit" tests(haha)
* make it so units cant do implcit mul with idents
* add bench and better tests
* fix editor api
* remove old test
* change hashmap context to use deref
* change constants to use hashmap instad of function
---------
Co-authored-by: hypercube <0hypercube@gmail.com>
Co-authored-by: Keavon Chambers <keavon@keavon.com>
* pen should always snap on last anchor
Signed-off-by: James Ryans <james.ryans2012@gmail.com>
* snap anchor on every single connected points
Signed-off-by: James Ryans <james.ryans2012@gmail.com>
---------
Signed-off-by: James Ryans <james.ryans2012@gmail.com>
* Append to a path with shift
* Fixup transforms
* Revert unnecessary transform change
* Fix delete node button transaction
* Prevent artboard from being selected after making a new document
---------
Co-authored-by: Keavon Chambers <keavon@keavon.com>