mirror of
https://github.com/phil-opp/blog_os.git
synced 2025-12-18 07:17:49 +00:00
Rearrange circle and text
This commit is contained in:
@@ -7,8 +7,8 @@ use bootloader_api::BootInfo;
|
|||||||
use embedded_graphics::{
|
use embedded_graphics::{
|
||||||
draw_target::DrawTarget,
|
draw_target::DrawTarget,
|
||||||
geometry::Point,
|
geometry::Point,
|
||||||
mono_font::{self, MonoTextStyle},
|
mono_font::{ascii::FONT_10X20, MonoTextStyle},
|
||||||
pixelcolor::{Rgb888, RgbColor, WebColors},
|
pixelcolor::{Rgb888, RgbColor},
|
||||||
primitives::{Circle, PrimitiveStyle, StyledDrawable},
|
primitives::{Circle, PrimitiveStyle, StyledDrawable},
|
||||||
text::Text,
|
text::Text,
|
||||||
Drawable,
|
Drawable,
|
||||||
@@ -27,7 +27,7 @@ fn kernel_main(boot_info: &'static mut BootInfo) -> ! {
|
|||||||
.draw_styled(&style, &mut display)
|
.draw_styled(&style, &mut display)
|
||||||
.unwrap_or_else(infallible);
|
.unwrap_or_else(infallible);
|
||||||
|
|
||||||
let character_style = MonoTextStyle::new(&mono_font::ascii::FONT_10X20, Rgb888::BLUE);
|
let character_style = MonoTextStyle::new(&FONT_10X20, Rgb888::BLUE);
|
||||||
let text = Text::new("Hello, world!", Point::new(190, 250), character_style);
|
let text = Text::new("Hello, world!", Point::new(190, 250), character_style);
|
||||||
text.draw(&mut display).unwrap_or_else(infallible);
|
text.draw(&mut display).unwrap_or_else(infallible);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user