Project

General

Profile

Revision 120

apparently no error... and now display is much faster

View differences:

graphics.c
126 126
    return SUCCESS;
127 127
}
128 128

  
129
int (vg_draw_hline)(uint16_t x, uint16_t y, uint16_t len, uint32_t color){
129
int (draw_hline)(uint16_t x, uint16_t y, uint16_t len, uint32_t color){
130 130
    int r;
131 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
int (vg_draw_hline)(uint16_t x, uint16_t y, uint16_t len, uint32_t color){
136
    return draw_hline(x,y,len,color);
137
}
135 138

  
136 139
int (draw_rectangle)(uint16_t x, uint16_t y,uint16_t width, uint16_t height, uint32_t color)	{
137 140
    int r;
138 141
    for (uint16_t i = 0; i < height; i++)
139
        if ((r = vg_draw_hline(x, y + i, width, color))) return r;
142
        if ((r = draw_hline(x, y + i, width, color))) return r;
140 143
    return SUCCESS;
141 144
}
145
int (vg_draw_rectangle)(uint16_t x, uint16_t y,uint16_t width, uint16_t height, uint32_t color){
146
    return draw_rectangle(x,y,width,height, color);
147
}

Also available in: Unified diff