MCPcopy Create free account
hub / github.com/RavEngine/RavEngine / drawLine

Function drawLine

deps/SDL2/test/testgesture.c:93–100  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

91}
92
93static void
94drawLine(SDL_Surface *screen, float x0, float y0, float x1, float y1, unsigned int col)
95{
96 float t;
97 for (t = 0; t < 1; t += (float) (1.0f / SDL_max(SDL_fabs(x0 - x1), SDL_fabs(y0 - y1)))) {
98 setpix(screen, x1 + t * (x0 - x1), y1 + t * (y0 - y1), col);
99 }
100}
101
102static void
103drawCircle(SDL_Surface *screen, float x, float y, float r, unsigned int c)

Callers 1

drawPolygonMethod · 0.50

Calls 2

SDL_fabsFunction · 0.85
setpixFunction · 0.85

Tested by

no test coverage detected