Create a slideshow application in my cyberpunk style #252

Merged
savanni merged 15 commits from cybperpunk-billboard into main 2024-11-03 21:16:38 +00:00
1 changed files with 2 additions and 2 deletions
Showing only changes of commit db34e69cdf - Show all commits

View File

@ -128,12 +128,12 @@ impl Animation for CrossFade {
let frames = (now - self.start_time).as_secs_f64() * FPS as f64; let frames = (now - self.start_time).as_secs_f64() * FPS as f64;
let alpha = alpha_rate * frames as f64; let alpha = alpha_rate * frames as f64;
let text_display = Text::new(self.old_text.clone(), context, 32., width); let text_display = Text::new(self.old_text.clone(), context, 64., width);
let _ = context.move_to(0., text_display.extents().height()); let _ = context.move_to(0., text_display.extents().height());
let _ = context.set_source_rgba(PURPLE.0, PURPLE.1, PURPLE.2, 1. - alpha); let _ = context.set_source_rgba(PURPLE.0, PURPLE.1, PURPLE.2, 1. - alpha);
text_display.draw(); text_display.draw();
let text_display = Text::new(self.new_text.clone(), context, 32., width); let text_display = Text::new(self.new_text.clone(), context, 64., width);
let _ = context.move_to(0., text_display.extents().height()); let _ = context.move_to(0., text_display.extents().height());
let _ = context.set_source_rgba(PURPLE.0, PURPLE.1, PURPLE.2, alpha); let _ = context.set_source_rgba(PURPLE.0, PURPLE.1, PURPLE.2, alpha);
text_display.draw(); text_display.draw();