mirror of
https://github.com/penpot/penpot.git
synced 2025-07-28 14:17:29 +02:00
🐛 Fix path rotation
This commit is contained in:
parent
d4b829ed19
commit
e1c5cd6640
4 changed files with 110 additions and 76 deletions
|
@ -1,6 +1,6 @@
|
|||
use skia_safe as skia;
|
||||
|
||||
#[derive(Debug, Clone, Copy)]
|
||||
#[derive(Debug, Clone, Copy, PartialEq)]
|
||||
pub struct Matrix {
|
||||
pub a: f32,
|
||||
pub b: f32,
|
||||
|
@ -47,6 +47,15 @@ impl Matrix {
|
|||
res
|
||||
}
|
||||
|
||||
pub fn no_translation(&self) -> Self {
|
||||
let mut res = Self::identity();
|
||||
res.c = self.c;
|
||||
res.b = self.b;
|
||||
res.a = self.a;
|
||||
res.d = self.d;
|
||||
res
|
||||
}
|
||||
|
||||
fn translation(&self) -> (f32, f32) {
|
||||
(self.e, self.f)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue