Skip to content

Commit ec478fc

Browse files
committed
update embedded_graphics and slint porting guide
Signed-off-by: Zheng Hua <hua.zheng@embeddedboys.com>
1 parent 6465347 commit ec478fc

File tree

2 files changed

+412
-3
lines changed

2 files changed

+412
-3
lines changed

content/docs/porting/embedded_graphics.md

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,4 +110,15 @@ let rotation = Orientation::new().rotate(Rotation::Deg270).flip_horizontal();
110110
.orientation(rotation)
111111
.init(&mut delay)
112112
.unwrap();
113-
```
113+
```
114+
115+
测试字体绘制接口
116+
```rust
117+
let style = MonoTextStyle::new(&FONT_10X20, color);
118+
119+
Text::new("Hello, Rust!", Point::new(180, 140), style)
120+
.draw(&mut display)
121+
.unwrap();
122+
```
123+
124+
> 基于 PIO 的实现在 slint 章节中介绍

0 commit comments

Comments
 (0)