Commit graph

1726 commits

Author SHA1 Message Date
Dennis Kobert
98bdbc2429
Remove file write 2025-01-12 00:48:02 +01:00
Dennis Kobert
89cf008f85
Remove checks from append_subpath 2025-01-12 00:41:20 +01:00
Dennis Kobert
75a40a178d
Optimize grid rounding and add debug output 2025-01-12 00:41:09 +01:00
Dennis Kobert
1b91571e95
Special case cubic line intersections 2025-01-12 00:41:09 +01:00
Dennis Kobert
5653662ab3
Remove loop check in bit vec iter 2025-01-12 00:41:08 +01:00
Dennis Kobert
247b5dc604
Improve intersection candidate finding 2025-01-12 00:41:07 +01:00
Dennis Kobert
e90dc26ce8
Make find vertecies use 64 bit again this is slower but less likely to cause issues 2025-01-12 00:41:07 +01:00
Dennis Kobert
635c913c02
Transition aabb to use glam vecs 2025-01-12 00:41:06 +01:00
Dennis Kobert
716ea501c9
Use approximate bounding box for edge finding 2025-01-12 00:41:06 +01:00
Dennis Kobert
76f48a5bda
Improve allocations for compute_minor 2025-01-12 00:41:05 +01:00
Dennis Kobert
982473fe67
Use smallvec for storing outgoing edges 2025-01-12 00:41:04 +01:00
Dennis Kobert
cb4d19d722
Remove unused bounding boxes 2025-01-12 00:41:04 +01:00
Dennis Kobert
d497dcfb02
Tune initial vec capacities 2025-01-12 00:41:03 +01:00
Dennis Kobert
b0d7d816e0
Unroll find_vertecies loop and use 32 bit positions 2025-01-12 00:41:03 +01:00
Dennis Kobert
f9e505368e
Use hashmap based approach for find vertices 2025-01-12 00:41:00 +01:00
Dennis Kobert
ee8871c915
Use faster hash and specify capacities 2025-01-12 00:40:27 +01:00
Dennis Kobert
577cb23304
Reuse bounding box 2025-01-12 00:40:26 +01:00
Dennis Kobert
9a568bdf17
Use direct root finding for inclusion testing 2025-01-12 00:40:26 +01:00
Dennis Kobert
cbd54c8b12
Reuse allocations for hit testing 2025-01-12 00:40:25 +01:00
Dennis Kobert
ddf5f796b4
Use outer/inner bounding box for inclusion testing 2025-01-12 00:40:25 +01:00
Dennis Kobert
2d113557ce
Use swap remove 2025-01-12 00:40:24 +01:00
Dennis Kobert
a1f3f076bd
Improve perf of path bool lib 2025-01-12 00:40:24 +01:00
Keavon Chambers
3582126ded Remove the Pen tool's anchor square under the cursor when drawing a not-yet-placed segment 2025-01-10 13:12:51 -08:00
Priyanshu
bf6ffbddeb Bezier-rs: Add method to check subpath insideness (#2183)
* 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>
2025-01-10 00:37:40 -08:00
Keavon Chambers
51d1c4eeac Fix drawing new layers not being put next to nested selected layers
A regression introduced in #2110
2025-01-09 20:37:49 -08:00
Keavon Chambers
07601a5c6c Improve snapping with better snap target names, tooltips, cleaner overlay labels, code cleanup 2025-01-09 19:03:14 -08:00
Keavon Chambers
ae2637e08e More website loading speed and code improvements 2025-01-08 20:49:42 -08:00
Keavon Chambers
68e6bec9b5 Reduce website loading times and related code cleanup 2025-01-08 18:29:54 -08:00
Keavon Chambers
93a60daa24 Comprehensively update user manual and contributor guide, add Adam to core team 2025-01-08 03:52:11 -08:00
Keavon Chambers
9eb544df74 Rename "options/top bar" terminology to "control bar" and update comments 2025-01-07 17:33:45 -08:00
Keavon Chambers
1c880daea2 Fix isometric dotted grid and avoid antialiasing on dashed line overlays 2025-01-07 17:27:35 -08:00
Nitish Choudhary
66357540bb
Add max width/height to text layers and draggable text boxes to the Text tool (#2118)
* 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>
2024-12-31 20:50:47 -08:00
Sidharth-Singh10
f225756655
Fix text layer getting deselected after clicking out of Text tool interactive editing (#2144)
* 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>
2024-12-31 14:28:56 -08:00
Ayush Chauhan
39a7b76ade
Add snap and lock angle modifiers for handle dragging to the Path tool (#2160)
* 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>
2024-12-31 19:48:14 +00:00
Pratik Agrawal
606be8a74b
Make the Artboard tool shift its contents if resizing from the top/left so artwork is stationary (#2166)
* added fetch child layerfunction

* Simplify

---------

Co-authored-by: Pratik Agrawal <patrik@Pratiks-MacBook-Air.local>
Co-authored-by: hypercube <0hypercube@gmail.com>
2024-12-31 18:52:05 +00:00
Keavon Chambers
54926d5474 We reached 10k stars on GitHub! 2024-12-31 10:14:33 -08:00
Keavon Chambers
740fcb73cc Remove the hexagon shape from the above-the-fold part of the website homepage 2024-12-30 20:26:05 -08:00
Keavon Chambers
ce0cd39c9b
Update the readme 2024-12-30 03:17:39 -08:00
Nitish Choudhary
2293da7d98
Improve Text tool click targets on text layers to use the text box (#2145)
* Fix text selection

* Remove old implementation

* minor change

* Use inbuilt function instead of helper

* Code review

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2024-12-28 22:11:27 +00:00
Dennis Kobert
1639a2afba
Parse doc comments on node parameters (#2163)
Parse doc comments from node arguments

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2024-12-28 12:15:49 +00:00
0SlowPoke0
6c3c2e8529
Add selection removal to the Select tool's box select (Ctrl+Shift modifier) (#2162)
* select parent-node,remove deselect all layers message

* Comment nits

* implement negative selection box

* moved comment and formatting

* Apply suggestions from code review

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2024-12-28 11:43:29 +00:00
Utsav Singh
6d737f15ee
Improve quick measurement overlays with better number alignment and decimal rounding (#2155)
* 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>
2024-12-28 00:45:26 -08:00
Keavon Chambers
b81f48385a Fix several bugged vector-related nodes 2024-12-26 16:36:45 -08:00
Keavon Chambers
feba87449b Add more actions to the Layer menu bar entries 2024-12-26 16:31:13 -08:00
0SlowPoke0
a6676e4abd
Fix Select tool's box selection not being able to extend a selection with shift (#2157)
* select parent-node,remove deselect all layers message

* Comment nits

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2024-12-24 23:10:43 -08:00
0SlowPoke0
77936c44b0
Make Path tool deselect all points on single-click, and select all on double-click, of shape's fill (#2148)
* 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>
2024-12-22 21:59:59 -08:00
Utsav Singh
a1dc9556af
Improve quick measurement overlays across all possible arrangement scenarios (#2147)
* 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>
2024-12-22 19:20:03 -08:00
Utsav Singh
bc47d06139
Fix transform cage rotation abort causing broken state upon next transformation (#2149)
Fix abort functionality on Right Click when performing transformations using select tool
2024-12-22 01:54:30 -08:00
James Ryans
3be7505faf
Automatically place layers into the artboard they're drawn inside of (#2110)
* 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>
2024-12-20 19:02:00 -08:00
Ayush Chauhan
337b8bad13
Improve issues with selection history (#2138)
* 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.
2024-12-20 13:56:33 -08:00