mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2025-08-03 21:08:18 +00:00
Improve text transforms (#1487)
This commit is contained in:
parent
d2450b4d61
commit
f8b9c5db6d
9 changed files with 37 additions and 26 deletions
|
@ -395,7 +395,7 @@ impl GraphicElementRendered for Artboard {
|
|||
}
|
||||
}
|
||||
fn add_click_targets(&self, click_targets: &mut Vec<ClickTarget>) {
|
||||
let subpath = Subpath::new_rect(self.location.as_dvec2(), self.location.as_dvec2() + self.dimensions.as_dvec2());
|
||||
let subpath = Subpath::new_rect(DVec2::ZERO, self.dimensions.as_dvec2());
|
||||
click_targets.push(ClickTarget { stroke_width: 0., subpath });
|
||||
}
|
||||
}
|
||||
|
|
|
@ -127,7 +127,7 @@ impl TransformMut for VectorData {
|
|||
|
||||
impl Transform for Artboard {
|
||||
fn transform(&self) -> DAffine2 {
|
||||
DAffine2::IDENTITY
|
||||
DAffine2::from_translation(self.location.as_dvec2())
|
||||
}
|
||||
fn local_pivot(&self, pivot: DVec2) -> DVec2 {
|
||||
self.location.as_dvec2() + self.dimensions.as_dvec2() * pivot
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue