mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2026-09-24 19:58:11 +08:00
Differentiate between scale and dimensions (#570)
* Differentiate between scale and dimensions * Fix layout and naming of properties
This commit is contained in:
committed by
Keavon Chambers
parent
9ced465150
commit
0ee492a857
@@ -81,7 +81,7 @@ impl Default for GradientToolFsmState {
|
||||
|
||||
/// Computes the transform from gradient space to layer space (where gradient space is 0..1 in layer space)
|
||||
fn gradient_space_transform(path: &[LayerId], layer: &Layer, document: &DocumentMessageHandler) -> DAffine2 {
|
||||
let bounds = layer.current_bounding_box().unwrap();
|
||||
let bounds = layer.aabounding_box().unwrap();
|
||||
let bound_transform = DAffine2::from_scale_angle_translation(bounds[1] - bounds[0], 0., bounds[0]);
|
||||
|
||||
document.graphene_document.multiply_transforms(&path[..path.len() - 1]).unwrap() * bound_transform
|
||||
|
||||
@@ -166,7 +166,7 @@ fn update_overlays(document: &DocumentMessageHandler, data: &mut TextToolData, r
|
||||
.graphene_document
|
||||
.layer(layer_path)
|
||||
.unwrap()
|
||||
.current_bounding_box_with_transform(document.graphene_document.multiply_transforms(layer_path).unwrap())
|
||||
.aabounding_box_for_transform(document.graphene_document.multiply_transforms(layer_path).unwrap())
|
||||
.unwrap();
|
||||
|
||||
let operation = Operation::SetLayerTransformInViewport {
|
||||
|
||||
Reference in New Issue
Block a user