mirror of
https://github.com/Anshorei/epd-waveshare.git
synced 2026-10-03 22:06:43 +00:00
make draw_string accept string slices instead of char slices
This commit is contained in:
+2
-2
@@ -151,9 +151,9 @@ impl Graphics {
|
||||
|
||||
///TODO: implement!
|
||||
/// no autobreak line yet
|
||||
pub fn draw_string(&self, buffer: &mut[u8], x0: u16, y0: u16, input: &[char], color: &Color) {
|
||||
pub fn draw_string(&self, buffer: &mut[u8], x0: u16, y0: u16, input: &str, color: &Color) {
|
||||
let mut counter = 0;
|
||||
for &input_char in input.iter() {
|
||||
for input_char in input.chars() {
|
||||
self.draw_char(buffer, x0 + counter, y0, input_char, color);
|
||||
counter += 1;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user