Revision 104
stuff
lab5/graphics.c | ||
---|---|---|
109 | 109 |
} |
110 | 110 |
|
111 | 111 |
int (vg_draw_hline)(uint16_t x, uint16_t y, uint16_t len, uint32_t color){ |
112 |
|
|
113 |
//uint8_t color8 = color; |
|
114 |
uint8_t *p = video_mem; |
|
115 |
p += y*1024+x; |
|
116 |
//*(p++) = color8; |
|
117 |
//*(p++) = color8; |
|
118 |
//*(p++) = color8; |
|
112 | 119 |
/* |
113 |
uint8_t color8 = color; |
|
120 |
for(void *p = video_mem; p-video_mem < len; ++p){ |
|
121 |
*p = color; |
|
122 |
} |
|
123 |
*/ |
|
124 |
/* |
|
114 | 125 |
for(uint16_t l = 0; l < len; ++l){ |
115 |
*(video_mem+y*1024+x+len) = color8; |
|
116 |
}*/ |
|
126 |
*((uint8_t*)(video_mem)+y*1024+x+len) = color8; |
|
127 |
} |
|
128 |
*/ |
|
117 | 129 |
return 0; |
118 | 130 |
} |
lab5/lab5.c | ||
---|---|---|
72 | 72 |
return 0; |
73 | 73 |
} |
74 | 74 |
|
75 |
///lcom_run lab5 "rectangle 105 3 3 30 30 12 -t 1" |
|
75 | 76 |
int(video_test_rectangle)(uint16_t mode, uint16_t x, uint16_t y, uint16_t width, uint16_t height, uint32_t color) { |
76 | 77 |
int r; |
77 | 78 |
if ((r = get_permissions_first_mbyte())) |
Also available in: Unified diff