Revision 192
added zoom/scale
graph.c | ||
---|---|---|
301 | 301 |
memcpy(video_mem, video_buf, graph_get_vram_size()); |
302 | 302 |
return 0; |
303 | 303 |
} |
304 |
|
|
305 |
/// RECTANGLE |
|
306 |
int (graph_draw_hline)(uint16_t x, uint16_t y, uint16_t len, uint32_t color){ |
|
307 |
int r; |
|
308 |
for (uint16_t i = 0; i < len; i++) |
|
309 |
if ((r = graph_set_pixel(x + i, y, color))) return r; |
|
310 |
return SUCCESS; |
|
311 |
} |
|
312 |
|
|
313 |
int (graph_draw_rectangle)(uint16_t x, uint16_t y,uint16_t width, uint16_t height, uint32_t color) { |
|
314 |
int r; |
|
315 |
for (uint16_t i = 0; i < height; i++) |
|
316 |
if ((r = graph_draw_hline(x, y + i, width, color))) return r; |
|
317 |
return SUCCESS; |
|
318 |
} |
Also available in: Unified diff