Implement the Crop Tool for artboard resizing (#519)

* Extract transformation cage to a seperate file

* Hook up tool

* Implement resize

* Draw artboards

* centre and constrain

* Bounding box is rotated

* Fix transform handle positions for artboard

* Drag layers

* Snapping

* Fix imports

* Cleanup

* Remove allocation from bounding_boxes

* Round artboard size and position

* Hints

* Fix rotated transform cage

* Code review changes

* Hints changes

Co-authored-by: Dennis <dennis@kobert.dev>
Co-authored-by: Keavon Chambers <keavon@keavon.com>
This commit is contained in:
0HyperCube
2022-02-09 15:22:23 -08:00
committed by Keavon Chambers
co-authored by Dennis Keavon Chambers
parent 8b6c786ca8
commit c54774c4c3
29 changed files with 817 additions and 340 deletions
+1 -1
View File
@@ -142,7 +142,7 @@ impl Fsm for PathToolFsmState {
// Select the first point within the threshold (in pixels)
if data.shape_editor.select_point(input.mouse.position, SELECTION_THRESHOLD, add_to_selection, responses) {
responses.push_back(DocumentMessage::StartTransaction.into());
data.snap_handler.start_snap(document, document.visible_layers(), true, true);
data.snap_handler.start_snap(document, document.bounding_boxes(None, None), true, true);
let snap_points = data
.shape_editor
.shapes_to_modify