mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2025-12-23 10:11:54 +00:00
Fix line centering (#431)
This commit is contained in:
parent
1972141280
commit
6c25d8138a
1 changed files with 3 additions and 2 deletions
|
|
@ -226,12 +226,13 @@ fn generate_transform(data: &mut LineToolData, lock: bool, snap: bool, center: b
|
|||
}
|
||||
|
||||
if center {
|
||||
start -= dir / 2.;
|
||||
start -= scale * DVec2::new(angle.cos(), angle.sin());
|
||||
scale *= 2.;
|
||||
}
|
||||
|
||||
Operation::SetLayerTransformInViewport {
|
||||
path: data.path.clone().unwrap(),
|
||||
transform: glam::DAffine2::from_scale_angle_translation(DVec2::splat(scale), angle, start).to_cols_array(),
|
||||
transform: glam::DAffine2::from_scale_angle_translation(DVec2::new(scale, 1.), angle, start).to_cols_array(),
|
||||
}
|
||||
.into()
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue