-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathshapedemo2.c
55 lines (42 loc) · 1.07 KB
/
shapedemo2.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
#include <libTimer.h>
#include "lcdutils.h"
#include "lcddraw.h"
#include "shape.h"
AbRect rect10 = {abRectGetBounds, abRectCheck, 10,10};
AbRArrow arrow30 = {abRArrowGetBounds, abRArrowCheck, 30};
Region fence = {{10,30}, {SHORT_EDGE_PIXELS-10, LONG_EDGE_PIXELS-10}};
Layer layer2 = {
(AbShape *)&arrow30,
{screenWidth/2+40, screenHeight/2+10}, /* position */
{0,0}, {0,0}, /* last & next pos */
COLOR_BLACK,
0,
};
Layer layer1 = {
(AbShape *)&rect10,
{screenWidth/2, screenHeight/2}, /* position */
{0,0}, {0,0}, /* last & next pos */
COLOR_RED,
&layer2,
};
Layer layer0 = {
(AbShape *)&rect10,
{(screenWidth/2)+10, (screenHeight/2)+5}, /* position */
{0,0}, {0,0}, /* last & next pos */
COLOR_ORANGE,
&layer1,
};
u_int bgColor = COLOR_BLUE;
int
main()
{
configureClocks();
lcd_init();
shapeInit();
Vec2 rectPos = screenCenter, circlePos = {30,screenHeight - 30};
clearScreen(COLOR_BLUE);
drawString5x7(20,20, "hello", COLOR_GREEN, COLOR_RED);
shapeInit();
layerInit(&layer0);
layerDraw(&layer0);
}