Download kernel/src/graphics/wallpaper.rs from Jaswanth-2008/AeroOS: direct link, hf CLI and curl.
- Browser
- Download file 917 Bytes
-
https://huggingface.co/Jaswanth-2008/AeroOS/resolve/main/kernel/src/graphics/wallpaper.rs
- Command line
-
hf download hf://Jaswanth-2008/AeroOS/kernel/src/graphics/wallpaper.rs
-
curl -L -o wallpaper.rs https://huggingface.co/Jaswanth-2008/AeroOS/resolve/main/kernel/src/graphics/wallpaper.rs
917 Bytes
| use crate::graphics::color::Color; | |
| use crate::graphics::surface::Surface; | |
| pub fn render_wallpaper(surface: &mut Surface) { | |
| let w = surface.width; | |
| let h = surface.height; | |
| // Authentic Windows 11 Bloom & macOS Monterey Atmosphere | |
| // Deep Midnight Sapphire (#0e1c34) -> Royal Cobalt (#183e76) -> Electric Azure (#2563eb) -> Deep Slate (#0f172a) | |
| let h1 = (h * 35) / 100; | |
| let h2 = (h * 70) / 100; | |
| surface.draw_gradient_v(0, 0, w, h1, Color::rgb(14, 28, 52), Color::rgb(24, 62, 118)); | |
| surface.draw_gradient_v(0, h1 as i32, w, h2 - h1, Color::rgb(24, 62, 118), Color::rgb(37, 99, 235)); | |
| surface.draw_gradient_v(0, h2 as i32, w, h - h2, Color::rgb(37, 99, 235), Color::rgb(15, 23, 42)); | |
| // Soft celestial light arc at horizon | |
| surface.draw_rect(0, h1 as i32, w, 1, Color::rgba(147, 197, 253, 50)); | |
| surface.draw_rect(0, h1 as i32 + 1, w, 1, Color::rgba(96, 165, 250, 25)); | |
| } | |