MCPcopy Create free account
hub / github.com/F-Stack/f-stack / lwGetPixel

Function lwGetPixel

app/redis-6.2.6/src/lolwut.c:119–123  ·  view source on GitHub ↗

Return the value of the specified pixel on the canvas. */

Source from the content-addressed store, hash-verified

117
118/* Return the value of the specified pixel on the canvas. */
119int 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. */
126void lwDrawLine(lwCanvas *canvas, int x1, int y1, int x2, int y2, int color) {

Callers 3

renderCanvasFunction · 0.85
renderCanvasFunction · 0.85
generateSkyscraperFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected