Since the longest part of the algorithm is saving and reloading the data this speeds up the entire process. Next we can make sure every slide's text gets made and added individually such that they can be made one at a time and see the changes nearly instant
This commit is contained in:
parent
9aedc7a095
commit
8c709d97d1
1 changed files with 9 additions and 8 deletions
|
|
@ -339,15 +339,16 @@ impl TextSvg {
|
|||
Pixmap::new(size.width as u32, size.height as u32)
|
||||
.expect("opops");
|
||||
resvg::render(&resvg_tree, transform, &mut pixmap.as_mut());
|
||||
let _ = pixmap.save_png(&path);
|
||||
|
||||
debug!("rendered");
|
||||
let handle = Handle::from_path(path);
|
||||
// let handle = Handle::from_rgba(
|
||||
// size.width as u32,
|
||||
// size.height as u32,
|
||||
// pixmap.take(),
|
||||
// );
|
||||
// let _ = pixmap.save_png(&path);
|
||||
|
||||
debug!("saved");
|
||||
// let handle = Handle::from_path(path);
|
||||
let handle = Handle::from_rgba(
|
||||
size.width as u32,
|
||||
size.height as u32,
|
||||
pixmap.take(),
|
||||
);
|
||||
self.handle = Some(handle);
|
||||
debug!("stored");
|
||||
self
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue