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

Function DrawRectRectIntersections

deps/SDL2/test/testintersections.c:185–199  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

183}
184
185static void
186DrawRectRectIntersections(SDL_Renderer * renderer)
187{
188 int i, j;
189
190 SDL_SetRenderDrawColor(renderer, 255, 200, 0, 255);
191
192 for (i = 0; i < num_rects; i++)
193 for (j = i + 1; j < num_rects; j++) {
194 SDL_Rect r;
195 if (SDL_IntersectRect(&rects[i], &rects[j], &r)) {
196 SDL_RenderFillRect(renderer, &r);
197 }
198 }
199}
200
201void
202loop()

Callers 1

loopFunction · 0.85

Calls 3

SDL_SetRenderDrawColorFunction · 0.85
SDL_IntersectRectFunction · 0.85
SDL_RenderFillRectFunction · 0.85

Tested by

no test coverage detected