Set a pixel to the specified color. Color is 0 or 1, where zero means no * dot will be displayed, and 1 means dot will be displayed. * Coordinates are arranged so that left-top corner is 0,0. You can write * out of the size of the canvas without issues. */
| 110 | * Coordinates are arranged so that left-top corner is 0,0. You can write |
| 111 | * out of the size of the canvas without issues. */ |
| 112 | void lwDrawPixel(lwCanvas *canvas, int x, int y, int color) { |
| 113 | if (x < 0 || x >= canvas->width || |
| 114 | y < 0 || y >= canvas->height) return; |
| 115 | canvas->pixels[x+y*canvas->width] = color; |
| 116 | } |
| 117 | |
| 118 | /* Return the value of the specified pixel on the canvas. */ |
| 119 | int lwGetPixel(lwCanvas *canvas, int x, int y) { |
no outgoing calls
no test coverage detected