From c24222cb7a1fbd9ca97e03efca94070b207cba4c Mon Sep 17 00:00:00 2001 From: Sam Lantinga Date: Sat, 20 Dec 2008 18:26:06 +0000 Subject: [PATCH] Add a few test pattern lines --HG-- extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403354 --- test/testlines2.c | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/test/testlines2.c b/test/testlines2.c index a90c7fc01..af579a95b 100644 --- a/test/testlines2.c +++ b/test/testlines2.c @@ -63,11 +63,18 @@ DrawLines(SDL_WindowID window) SDL_SetRenderDrawColor(255, (Uint8) current_color, (Uint8) current_color, (Uint8) current_alpha); - x1 = rand() % window_w; - x2 = rand() % window_w; - y1 = rand() % window_h; - y2 = rand() % window_h; - SDL_RenderLine(x1, y1, x2, y2); + if (i == 0) { + SDL_RenderLine(0, 0, window_w, window_h); + SDL_RenderLine(0, window_h, window_w, 0); + SDL_RenderLine(0, window_h/2, window_w, window_h/2); + SDL_RenderLine(window_w/2, 0, window_w/2, window_h); + } else { + x1 = rand() % window_w; + x2 = rand() % window_w; + y1 = rand() % window_h; + y2 = rand() % window_h; + SDL_RenderLine(x1, y1, x2, y2); + } } SDL_SetRenderDrawBlendMode(SDL_BLENDMODE_NONE);