summaryrefslogtreecommitdiff
path: root/test/testsprite2.c
diff options
context:
space:
mode:
authorSam Lantinga <slouken@libsdl.org>2009-12-09 15:56:56 +0000
committerSam Lantinga <slouken@libsdl.org>2009-12-09 15:56:56 +0000
commit70a40d51b20df697220edb6b5429e8dd3388908d (patch)
treeadf2d5cb7d2a954df59b5b0211e21241faba2c3d /test/testsprite2.c
parentfd2629214e89da0dc8beac14ed943eea2a03768c (diff)
Added interfaces for batch drawing of points, lines and rects:
SDL_DrawPoints() SDL_BlendPoints() SDL_BlendLines() SDL_DrawLines() SDL_FillRects() SDL_BlendRects() SDL_RenderPoints() SDL_RenderLines() SDL_RenderRects() Renamed SDL_RenderFill() to SDL_RenderRect()
Diffstat (limited to 'test/testsprite2.c')
-rw-r--r--test/testsprite2.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/test/testsprite2.c b/test/testsprite2.c
index 94f3382849..a8ab84ac7e 100644
--- a/test/testsprite2.c
+++ b/test/testsprite2.c
@@ -141,7 +141,7 @@ MoveSprites(SDL_WindowID window, SDL_TextureID sprite)
/* Draw a gray background */
SDL_SetRenderDrawColor(0xA0, 0xA0, 0xA0, 0xFF);
- SDL_RenderFill(NULL);
+ SDL_RenderRect(NULL);
/* Test points */
SDL_SetRenderDrawColor(0xFF, 0x00, 0x00, 0xFF);
@@ -163,25 +163,25 @@ MoveSprites(SDL_WindowID window, SDL_TextureID sprite)
temp.y = 1;
temp.w = sprite_w;
temp.h = sprite_h;
- SDL_RenderFill(&temp);
+ SDL_RenderRect(&temp);
SDL_RenderCopy(sprite, NULL, &temp);
temp.x = window_w-sprite_w-1;
temp.y = 1;
temp.w = sprite_w;
temp.h = sprite_h;
- SDL_RenderFill(&temp);
+ SDL_RenderRect(&temp);
SDL_RenderCopy(sprite, NULL, &temp);
temp.x = 1;
temp.y = window_h-sprite_h-1;
temp.w = sprite_w;
temp.h = sprite_h;
- SDL_RenderFill(&temp);
+ SDL_RenderRect(&temp);
SDL_RenderCopy(sprite, NULL, &temp);
temp.x = window_w-sprite_w-1;
temp.y = window_h-sprite_h-1;
temp.w = sprite_w;
temp.h = sprite_h;
- SDL_RenderFill(&temp);
+ SDL_RenderRect(&temp);
SDL_RenderCopy(sprite, NULL, &temp);
/* Test diagonal lines */
@@ -304,7 +304,7 @@ main(int argc, char *argv[])
for (i = 0; i < state->num_windows; ++i) {
SDL_SelectRenderer(state->windows[i]);
SDL_SetRenderDrawColor(0xA0, 0xA0, 0xA0, 0xFF);
- SDL_RenderFill(NULL);
+ SDL_RenderRect(NULL);
}
if (LoadSprite("icon.bmp") < 0) {
quit(2);
@@ -350,7 +350,7 @@ main(int argc, char *argv[])
case SDL_WINDOWEVENT_EXPOSED:
SDL_SelectRenderer(event.window.windowID);
SDL_SetRenderDrawColor(0xA0, 0xA0, 0xA0, 0xFF);
- SDL_RenderFill(NULL);
+ SDL_RenderRect(NULL);
break;
}
break;