mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2026-09-26 03:38:12 +08:00
(G)rab, (R)otate, and (S)cale layers with hotkeys (#356)
* Add handler and input mapping. * Selecting transform type * Add translation and axis constraints * Remove unnecessary Key:: * Add rotation * Centre pivot point for rotation * Add scaling * Select Tool bounding box now updates when transforming * Add typing * Shift to slow mouse movements * Add snapping * Refactor modifier keys * Refactor to apply only 1 operation per frame * Refactor to fix scale 0 issue * Remove logging * Avoid multiple decimol points in queue * Add typing negative * Add typing negative values * Fix bounding box on apply/abort; fix some variable names * Allow transform to daffine2 identity * Revert previous operation when changing operation * Remove repopulate transforms method * Code readability tweaks Co-authored-by: Keavon Chambers <keavon@keavon.com>
This commit is contained in:
committed by
Keavon Chambers
co-authored by
Keavon Chambers
parent
4f871919f5
commit
134381f1bc
@@ -137,8 +137,12 @@ impl Layer {
|
||||
self.data.intersects_quad(transformed_quad, path, intersections)
|
||||
}
|
||||
|
||||
pub fn current_bounding_box_with_transform(&self, transform: DAffine2) -> Option<[DVec2; 2]> {
|
||||
self.data.bounding_box(transform)
|
||||
}
|
||||
|
||||
pub fn current_bounding_box(&self) -> Option<[DVec2; 2]> {
|
||||
self.data.bounding_box(self.transform)
|
||||
self.current_bounding_box_with_transform(self.transform)
|
||||
}
|
||||
|
||||
pub fn as_folder_mut(&mut self) -> Result<&mut Folder, DocumentError> {
|
||||
|
||||
Reference in New Issue
Block a user