test/testintersections.c
changeset 3596 f638ded38b8a
parent 3536 0267b8b1595c
child 3685 64ce267332c6
     1.1 --- a/test/testintersections.c	Fri Dec 18 08:19:18 2009 +0000
     1.2 +++ b/test/testintersections.c	Wed Dec 23 01:55:00 2009 +0000
     1.3 @@ -59,7 +59,7 @@
     1.4  
     1.5          x = rand() % window_w;
     1.6          y = rand() % window_h;
     1.7 -        SDL_RenderPoint(x, y);
     1.8 +        SDL_RenderDrawPoint(x, y);
     1.9      }
    1.10      SDL_SetRenderDrawBlendMode(SDL_BLENDMODE_NONE);
    1.11  }
    1.12 @@ -100,12 +100,12 @@
    1.13          SDL_SetRenderDrawColor(255, 255, 255, 255);
    1.14  
    1.15          if (i == -1) {
    1.16 -            SDL_RenderLine(0, 0, window_w - 1, window_h - 1);
    1.17 -            SDL_RenderLine(0, window_h - 1, window_w - 1, 0);
    1.18 -            SDL_RenderLine(0, window_h / 2, window_w - 1, window_h / 2);
    1.19 -            SDL_RenderLine(window_w / 2, 0, window_w / 2, window_h - 1);
    1.20 +            SDL_RenderDrawLine(0, 0, window_w - 1, window_h - 1);
    1.21 +            SDL_RenderDrawLine(0, window_h - 1, window_w - 1, 0);
    1.22 +            SDL_RenderDrawLine(0, window_h / 2, window_w - 1, window_h / 2);
    1.23 +            SDL_RenderDrawLine(window_w / 2, 0, window_w / 2, window_h - 1);
    1.24          } else {
    1.25 -            SDL_RenderLine(lines[i].x, lines[i].y, lines[i].w, lines[i].h);
    1.26 +            SDL_RenderDrawLine(lines[i].x, lines[i].y, lines[i].w, lines[i].h);
    1.27          }
    1.28      }
    1.29      SDL_SetRenderDrawBlendMode(SDL_BLENDMODE_NONE);
    1.30 @@ -150,7 +150,7 @@
    1.31      SDL_SetRenderDrawBlendMode(SDL_BLENDMODE_NONE);
    1.32      for (i = 0; i < num_rects; ++i) {
    1.33          SDL_SetRenderDrawColor(255, 127, 0, 255);
    1.34 -        SDL_RenderRect(&rects[i]);
    1.35 +        SDL_RenderFillRect(&rects[i]);
    1.36      }
    1.37      SDL_SetRenderDrawBlendMode(SDL_BLENDMODE_NONE);
    1.38  }
    1.39 @@ -178,7 +178,7 @@
    1.40  
    1.41              if (SDL_IntersectRectAndLine(&r, &x1, &y1, &x2, &y2)) {
    1.42                  SDL_SetRenderDrawColor(0, 255, 55, 255);
    1.43 -                SDL_RenderLine(x1, y1, x2, y2);
    1.44 +                SDL_RenderDrawLine(x1, y1, x2, y2);
    1.45              }
    1.46          }
    1.47  
    1.48 @@ -197,7 +197,7 @@
    1.49              SDL_Rect r;
    1.50              if (SDL_IntersectRect(&rects[i], &rects[j], &r)) {
    1.51                  SDL_SetRenderDrawColor(255, 200, 0, 255);
    1.52 -                SDL_RenderRect(&r);
    1.53 +                SDL_RenderFillRect(&r);
    1.54              }
    1.55          }
    1.56  
    1.57 @@ -272,7 +272,7 @@
    1.58      for (i = 0; i < state->num_windows; ++i) {
    1.59          SDL_SelectRenderer(state->windows[i]);
    1.60          SDL_SetRenderDrawColor(0xA0, 0xA0, 0xA0, 0xFF);
    1.61 -        SDL_RenderRect(NULL);
    1.62 +        SDL_RenderClear();
    1.63      }
    1.64  
    1.65      srand(time(NULL));
    1.66 @@ -326,7 +326,7 @@
    1.67                  case SDL_WINDOWEVENT_EXPOSED:
    1.68                      SDL_SelectRenderer(event.window.windowID);
    1.69                      SDL_SetRenderDrawColor(0xA0, 0xA0, 0xA0, 0xFF);
    1.70 -                    SDL_RenderRect(NULL);
    1.71 +                    SDL_RenderClear();
    1.72                      break;
    1.73                  }
    1.74                  break;
    1.75 @@ -337,7 +337,7 @@
    1.76          for (i = 0; i < state->num_windows; ++i) {
    1.77              SDL_SelectRenderer(state->windows[i]);
    1.78              SDL_SetRenderDrawColor(0xA0, 0xA0, 0xA0, 0xFF);
    1.79 -            SDL_RenderRect(NULL);
    1.80 +            SDL_RenderClear();
    1.81  
    1.82              DrawRects(state->windows[i]);
    1.83              DrawPoints(state->windows[i]);