MCPcopy Create free account
hub / github.com/ProjectPhysX/FluidX3D / draw_pixel

Function draw_pixel

src/graphics.cpp:248–250  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

246}
247
248void draw_pixel(const int x, const int y, const int color) {
249 if(!is_off_screen(x, y)) camera.bitmap[x+y*(int)camera.width] = color; // only draw if point is on screen
250}
251void draw_circle(const int x, const int y, const int r, const int color) {
252 int d=-r, dx=r, dy=0; // Bresenham algorithm for circle
253 while(dx>=dy) {

Callers 5

draw_circleFunction · 0.85
draw_lineFunction · 0.85
draw_triangleFunction · 0.85
draw_rectangleFunction · 0.85
draw_textFunction · 0.85

Calls 2

is_off_screenFunction · 0.85
convert_pixelFunction · 0.85

Tested by

no test coverage detected