1
1
use embedded_graphics:: fonts:: Font6x8 ;
2
+ use embedded_graphics:: pixelcolor:: BinaryColor ;
2
3
use embedded_graphics:: prelude:: * ;
3
4
use embedded_graphics:: primitives:: { Circle , Line , Rectangle } ;
4
5
use embedded_graphics:: Drawing ;
@@ -14,13 +15,33 @@ fn main() {
14
15
disp. init ( ) . unwrap ( ) ;
15
16
disp. flush ( ) . unwrap ( ) ;
16
17
17
- disp. draw ( Line :: new ( Point :: new ( 8 , 16 + 16 ) , Point :: new ( 8 + 16 , 16 + 16 ) ) . into_iter ( ) ) ;
18
- disp. draw ( Line :: new ( Point :: new ( 8 , 16 + 16 ) , Point :: new ( 8 + 8 , 16 ) ) . into_iter ( ) ) ;
19
- disp. draw ( Line :: new ( Point :: new ( 8 + 16 , 16 + 16 ) , Point :: new ( 8 + 8 , 16 ) ) . into_iter ( ) ) ;
18
+ disp. draw (
19
+ Line :: new ( Point :: new ( 8 , 16 + 16 ) , Point :: new ( 8 + 16 , 16 + 16 ) )
20
+ . stroke ( Some ( BinaryColor :: On ) )
21
+ . into_iter ( ) ,
22
+ ) ;
23
+ disp. draw (
24
+ Line :: new ( Point :: new ( 8 , 16 + 16 ) , Point :: new ( 8 + 8 , 16 ) )
25
+ . stroke ( Some ( BinaryColor :: On ) )
26
+ . into_iter ( ) ,
27
+ ) ;
28
+ disp. draw (
29
+ Line :: new ( Point :: new ( 8 + 16 , 16 + 16 ) , Point :: new ( 8 + 8 , 16 ) )
30
+ . stroke ( Some ( BinaryColor :: On ) )
31
+ . into_iter ( ) ,
32
+ ) ;
20
33
21
- disp. draw ( Rectangle :: new ( Point :: new ( 48 , 16 ) , Point :: new ( 48 + 16 , 16 + 16 ) ) . into_iter ( ) ) ;
34
+ disp. draw (
35
+ Rectangle :: new ( Point :: new ( 48 , 16 ) , Point :: new ( 48 + 16 , 16 + 16 ) )
36
+ . stroke ( Some ( BinaryColor :: On ) )
37
+ . into_iter ( ) ,
38
+ ) ;
22
39
23
- disp. draw ( Circle :: new ( Point :: new ( 96 , 16 + 8 ) , 8 ) . into_iter ( ) ) ;
40
+ disp. draw (
41
+ Circle :: new ( Point :: new ( 96 , 16 + 8 ) , 8 )
42
+ . stroke ( Some ( BinaryColor :: On ) )
43
+ . into_iter ( ) ,
44
+ ) ;
24
45
25
46
let local_addr = machine_ip:: get ( ) . unwrap ( ) ;
26
47
0 commit comments