examples: over print in digital_rain.v, to simulate the custom font used in the movie effect (#21846)

This commit is contained in:
Mike Ward 2024-07-11 17:41:15 -05:00 committed by GitHub
parent 2cde320eee
commit d7550c5c02
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -36,7 +36,6 @@ fn main() {
}
fn rain(mut app App) {
// Create the drawing context
app.ctx = gg.new_context(
bg_color: gx.rgb(0, 0, 0)
width: app.screen_size.width
@ -151,6 +150,8 @@ fn draw_rain_column(rc RainColumn, app App) {
}
if i < rc.drops.len {
app.ctx.draw_text(x, y, rc.drops[i].ascii_str(), cfg)
app.ctx.draw_text(x, y, rc.drops[(i + 10) % rc.drops.len].ascii_str(),
cfg)
} else {
vprintln('BAD i: ${i} | rc.drops.len: ${rc.drops.len}')
}