Project

General

Profile

Revision 188

many changes

View differences:

graph.c
256 256
    return graph_set_pixel_buffer(x, y, color, video_buf, graph_get_XRes(), graph_get_YRes());
257 257
}
258 258
int (graph_set_pixel_buffer)(uint16_t x, uint16_t y, uint32_t color, uint8_t *buf, uint16_t W, uint16_t H) {
259
    if(buf == NULL) return NULL_PTR;
259 260
    if (x < 0 || W <= x || y < 0 || H <= y) {
260 261
        //printf("%s: invalid pixel.\n", __func__);
261 262
        return OUT_OF_RANGE;
......
265 266
    return SUCCESS;
266 267
}
267 268
int (graph_set_pixel_alpha_buffer)(uint16_t x, uint16_t y, uint8_t alpha, uint8_t *alp_buf, uint16_t W, uint16_t H) {
269
    if(alp_buf == NULL) return NULL_PTR;
268 270
    if (x < 0 || W <= x || y < 0 || H <= y) {
269 271
        //printf("%s: invalid pixel.\n", __func__);
270 272
        return OUT_OF_RANGE;

Also available in: Unified diff