Return the value of the specified pixel on the canvas. */
| 117 | |
| 118 | /* Return the value of the specified pixel on the canvas. */ |
| 119 | int lwGetPixel(lwCanvas *canvas, int x, int y) { |
| 120 | if (x < 0 || x >= canvas->width || |
| 121 | y < 0 || y >= canvas->height) return 0; |
| 122 | return canvas->pixels[x+y*canvas->width]; |
| 123 | } |
| 124 | |
| 125 | /* Draw a line from x1,y1 to x2,y2 using the Bresenham algorithm. */ |
| 126 | void lwDrawLine(lwCanvas *canvas, int x1, int y1, int x2, int y2, int color) { |
no outgoing calls
no test coverage detected