Add Image rotation support
Co-authored-by: DKolter <68352124+DKolter@users.noreply.github.com>
This commit is contained in:
parent
aae8e4f5cf
commit
09a6bcfffc
19 changed files with 374 additions and 84 deletions
|
|
@ -4,6 +4,7 @@ use crate::graphics::text;
|
|||
|
||||
use resvg::usvg::{self, TreeTextToPath};
|
||||
use rustc_hash::{FxHashMap, FxHashSet};
|
||||
use tiny_skia::Transform;
|
||||
|
||||
use std::cell::RefCell;
|
||||
use std::collections::hash_map;
|
||||
|
|
@ -34,6 +35,7 @@ impl Pipeline {
|
|||
color: Option<Color>,
|
||||
bounds: Rectangle,
|
||||
pixels: &mut tiny_skia::PixmapMut<'_>,
|
||||
transform: Transform,
|
||||
clip_mask: Option<&tiny_skia::Mask>,
|
||||
) {
|
||||
if let Some(image) = self.cache.borrow_mut().draw(
|
||||
|
|
@ -46,7 +48,7 @@ impl Pipeline {
|
|||
bounds.y as i32,
|
||||
image,
|
||||
&tiny_skia::PixmapPaint::default(),
|
||||
tiny_skia::Transform::identity(),
|
||||
transform,
|
||||
clip_mask,
|
||||
);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue