Lines Matching refs:x2
87 add_line(int x1, int y1, int x2, int y2) in add_line() argument
91 if ((x1 == x2) && (y1 == y2)) in add_line()
94 SDL_Log("adding line (%d, %d), (%d, %d)\n", x1, y1, x2, y2); in add_line()
97 lines[num_lines].w = x2; in add_line()
131 add_rect(int x1, int y1, int x2, int y2) in add_rect() argument
135 if ((x1 == x2) || (y1 == y2)) in add_rect()
138 if (x1 > x2) in add_rect()
139 SWAP(int, x1, x2); in add_rect()
143 SDL_Log("adding rect (%d, %d), (%d, %d) [%dx%d]\n", x1, y1, x2, y2, in add_rect()
144 x2 - x1, y2 - y1); in add_rect()
148 rects[num_rects].w = x2 - x1; in add_rect()
170 int x1, y1, x2, y2; in DrawRectLineIntersections() local
176 x2 = lines[j].w; in DrawRectLineIntersections()
179 if (SDL_IntersectRectAndLine(&r, &x1, &y1, &x2, &y2)) { in DrawRectLineIntersections()
180 SDL_RenderDrawLine(renderer, x1, y1, x2, y2); in DrawRectLineIntersections()