mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2026-09-19 02:48:12 +08:00
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:
committed by
Keavon Chambers
parent
29485001e9
commit
45edeb2a2b
@@ -52,17 +52,17 @@ impl EditorTestUtils for Editor {
|
||||
let mut editor_mouse_state = EditorMouseState::new();
|
||||
editor_mouse_state.editor_position = ViewportPosition::new(x, y);
|
||||
let modifier_keys = ModifierKeys::default();
|
||||
self.input(InputPreprocessorMessage::MouseMove { editor_mouse_state, modifier_keys });
|
||||
self.input(InputPreprocessorMessage::PointerMove { editor_mouse_state, modifier_keys });
|
||||
}
|
||||
|
||||
fn mousedown(&mut self, editor_mouse_state: EditorMouseState) {
|
||||
let modifier_keys = ModifierKeys::default();
|
||||
self.input(InputPreprocessorMessage::MouseDown { editor_mouse_state, modifier_keys });
|
||||
self.input(InputPreprocessorMessage::PointerDown { editor_mouse_state, modifier_keys });
|
||||
}
|
||||
|
||||
fn mouseup(&mut self, editor_mouse_state: EditorMouseState) {
|
||||
let modifier_keys = ModifierKeys::default();
|
||||
self.handle_message(InputPreprocessorMessage::MouseUp { editor_mouse_state, modifier_keys });
|
||||
self.handle_message(InputPreprocessorMessage::PointerUp { editor_mouse_state, modifier_keys });
|
||||
}
|
||||
|
||||
fn lmb_mousedown(&mut self, x: f64, y: f64) {
|
||||
|
||||
Reference in New Issue
Block a user