Go to the source code of this file.
◆ SDL_GetSpanEnclosingRect()
Definition at line 469 of file SDL_rect.c.
471{
473 int span_y1, span_y2;
474 int rect_y1, rect_y2;
475
479 }
480
484 }
485
489 }
490
494 }
495
496 if (numrects < 1) {
499 }
500
501
503 span_y2 = 0;
504
505 for (
i = 0;
i < numrects; ++
i) {
507 rect_y2 = rect_y1 +
rects[
i].h;
508
509
510 if (rect_y1 < 0) {
511 span_y1 = 0;
512 } else if (rect_y1 < span_y1) {
513 span_y1 = rect_y1;
514 }
517 } else if (rect_y2 > span_y2) {
518 span_y2 = rect_y2;
519 }
520 }
521 if (span_y2 > span_y1) {
525 span->h = (span_y2 - span_y1);
527 }
529}
#define SDL_InvalidParamError(param)
GLint GLint GLsizei width
GLint GLint GLsizei GLsizei height
GLenum GLenum void void void * span
return Display return Display Bool Bool int int int return Display XEvent Bool(*) XPointer return Display return Display Drawable _Xconst char unsigned int unsigned int return Display Pixmap Pixmap XColor XColor unsigned int unsigned int return Display _Xconst char char int char return Display Visual unsigned int int int char unsigned int unsigned int in i)
EGLSurface EGLint * rects
References i, SDL_FALSE, SDL_InvalidParamError, and SDL_TRUE.
Referenced by SDL_UpdateWindowTexture().