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 23:22:23 +00:00
committed by Keavon Chambers
parent 29485001e9
commit 45edeb2a2b
29 changed files with 817 additions and 340 deletions

View File

@@ -166,7 +166,7 @@ impl MessageHandler<MovementMessage, (&Document, &InputPreprocessorMessageHandle
}
responses.push_back(SetCanvasZoom { zoom_factor: new_scale }.into());
}
MouseMove {
PointerMove {
snap_angle,
wait_for_snap_angle_release,
snap_zoom,
@@ -344,7 +344,7 @@ impl MessageHandler<MovementMessage, (&Document, &InputPreprocessorMessageHandle
if self.panning || self.tilting || self.zooming {
let transforming = actions!(MovementMessageDiscriminant;
MouseMove,
PointerMove,
TransformCanvasEnd,
);
common.extend(transforming);