Revision 119
generates problem
lab5/graphics.c | ||
---|---|---|
133 | 133 |
return SUCCESS; |
134 | 134 |
} |
135 | 135 |
|
136 |
int (vg_draw_rectangle)(uint16_t x, uint16_t y,uint16_t width, uint16_t height, uint32_t color) {
|
|
136 |
int (draw_rectangle)(uint16_t x, uint16_t y,uint16_t width, uint16_t height, uint32_t color) { |
|
137 | 137 |
int r; |
138 | 138 |
for (uint16_t i = 0; i < height; i++) |
139 | 139 |
if ((r = vg_draw_hline(x, y + i, width, color))) return r; |
lab5/graphics.h | ||
---|---|---|
51 | 51 |
|
52 | 52 |
|
53 | 53 |
//int (draw_hline)(uint16_t x, uint16_t y, uint16_t len, uint32_t color); |
54 |
//int (draw_rectangle)(uint16_t x, uint16_t y,uint16_t width, uint16_t height, uint32_t color);
|
|
54 |
int (draw_rectangle)(uint16_t x, uint16_t y,uint16_t width, uint16_t height, uint32_t color); |
|
55 | 55 |
|
56 | 56 |
#endif /* end of include guard: GRAPHICS_H_INCLUDED */ |
lab5/lab5.c | ||
---|---|---|
97 | 97 |
return 1; |
98 | 98 |
}; |
99 | 99 |
|
100 |
if (vg_draw_rectangle(x, y, width, height, color)) {
|
|
100 |
if (draw_rectangle(x, y, width, height, color)) { |
|
101 | 101 |
if (vg_exit()) { |
102 | 102 |
printf("%s: vg_exit failed to exit to text mode.\n", __func__); |
103 | 103 |
if (free_memory()) printf("%s: lm_free failed\n", __func__); |
... | ... | |
202 | 202 |
B = (GET_BLU(first) + (col+row)*step) % (1 << get_BlueMaskSize()); |
203 | 203 |
color = SET_COLOR(R,G,B); |
204 | 204 |
} |
205 |
if (vg_draw_rectangle(col*W,row*H,W,H,color)) {
|
|
205 |
if (draw_rectangle(col*W,row*H,W,H,color)) { |
|
206 | 206 |
if (vg_exit()) { |
207 | 207 |
printf("%s: vg_exit failed to exit to text mode.\n", __func__); |
208 | 208 |
if (free_memory()) printf("%s: lm_free failed\n", __func__); |
Also available in: Unified diff