Modify shapes geometry instead of transformation matrix

This commit is contained in:
alonso.torres 2025-02-20 16:52:11 +01:00
parent b661f39422
commit 9143187efd
3 changed files with 106 additions and 28 deletions

View file

@ -1,4 +1,4 @@
use skia_safe as skia;
use skia_safe::{self as skia, Matrix};
use std::array::TryFromSliceError;
type Point = (f32, f32);
@ -144,4 +144,8 @@ impl Path {
pub fn is_open(&self) -> bool {
self.open
}
pub fn transform(&mut self, mtx: &Matrix) {
self.skia_path.transform(mtx);
}
}