src/video/SDL_rect.c
changeset 3004 f3d7226a8dfd
parent 2997 e4f025078c1c
child 3046 47965eacde88
equal deleted inserted replaced
3003:699d68ef2aca 3004:f3d7226a8dfd
   148         return SDL_TRUE;
   148         return SDL_TRUE;
   149     }
   149     }
   150 
   150 
   151     /* Check to see if entire line is to one side of rect */
   151     /* Check to see if entire line is to one side of rect */
   152     if ((x1 < rectx1 && x2 < rectx1) || (x1 > rectx2 && x2 > rectx2) ||
   152     if ((x1 < rectx1 && x2 < rectx1) || (x1 > rectx2 && x2 > rectx2) ||
   153         (y1 < recty1 && y2 < recty2) || (y1 > recty2 && y2 > recty2)) {
   153         (y1 < recty1 && y2 < recty1) || (y1 > recty2 && y2 > recty2)) {
   154         return SDL_FALSE;
   154         return SDL_FALSE;
   155     }
   155     }
   156 
   156 
   157     if (y1 == y2) {
   157     if (y1 == y2) {
   158         /* Horizontal line, easy to clip */
   158         /* Horizontal line, easy to clip */