Project

General

Profile

Revision 117

generating strange error

View differences:

lab5/graphics.c
128 128

  
129 129
int (vg_draw_hline)(uint16_t x, uint16_t y, uint16_t len, uint32_t color){
130 130
    int r;
131
    for (int i = 0; i < len; i++)
131
    for (uint16_t i = 0; i < len; i++)
132 132
        if ((r = set_pixel(x + i, y, color))) return r;
133 133
    return SUCCESS;
134 134
}
135 135

  
136 136
int (vg_draw_rectangle)(uint16_t x, uint16_t y,uint16_t width, uint16_t height, uint32_t color)	{
137 137
    int r;
138
    for (int i = 0; i < height; i++)
138
    for (uint16_t i = 0; i < height; i++)
139 139
        if ((r = vg_draw_hline(x, y + i, width, color))) return r;
140

  
141 140
    return SUCCESS;
142 141
}
lab5/graphics.h
49 49
 */
50 50
int (set_graphics_mode)(uint16_t mode);
51 51

  
52
//int (draw_hline)(uint16_t x, uint16_t y, uint16_t len, uint32_t color);
53
//int (draw_rectangle)(uint16_t x, uint16_t y,uint16_t width, uint16_t height, uint32_t color);
54

  
52 55
#endif /* end of include guard: GRAPHICS_H_INCLUDED */

Also available in: Unified diff