Make the text larger
This commit is contained in:
parent
20623284ed
commit
db34e69cdf
|
@ -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();
|
||||||
|
|
Loading…
Reference in New Issue