Files
Graphite/editor/src/document/transform_layer_message.rs
0HyperCube 45edeb2a2b 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>
2022-02-09 23:22:23 +00:00

23 lines
513 B
Rust

use crate::input::keyboard::Key;
use crate::message_prelude::*;
use serde::{Deserialize, Serialize};
#[remain::sorted]
#[impl_message(Message, DocumentMessage, TransformLayers)]
#[derive(PartialEq, Clone, Debug, Serialize, Deserialize)]
pub enum TransformLayerMessage {
ApplyTransformOperation,
BeginGrab,
BeginRotate,
BeginScale,
CancelTransformOperation,
ConstrainX,
ConstrainY,
PointerMove { slow_key: Key, snap_key: Key },
TypeBackspace,
TypeDecimalPoint,
TypeDigit { digit: u8 },
TypeNegate,
}