MCPcopy Index your code
hub / github.com/FrameworkComputer/inputmodule-rs / draw_text

Function draw_text

fl16-inputmodules/src/graphics.rs:30–43  ·  view source on GitHub ↗
(target: &mut D, target_text: &str, offset: Point)

Source from the content-addressed store, hash-verified

28}
29
30pub fn draw_text<D>(target: &mut D, target_text: &str, offset: Point) -> Result<(), D::Error>
31where
32 D: DrawTarget<Color = Rgb565>,
33{
34 let text = Text::new(
35 target_text,
36 Point::new(30, 30) + offset,
37 MonoTextStyle::new(&FONT_9X15, Rgb565::BLACK),
38 );
39
40 text.draw(target)?;
41
42 Ok(())
43}
44
45pub fn draw_logo<D>(target: &mut D, offset: Point) -> Result<Rectangle, D::Error>
46where

Callers 2

handle_commandFunction · 0.85
mainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected