This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project gfxprim.git.
The branch, master has been updated via 6b71d7fd13d9e9f9bd596d75e07d196c8042205c (commit) from 188e3a319e7a0f9eb12cfd5d06a0ac7aa996d771 (commit)
Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below.
- Log ----------------------------------------------------------------- http://repo.or.cz/w/gfxprim.git/commit/6b71d7fd13d9e9f9bd596d75e07d196c80422...
commit 6b71d7fd13d9e9f9bd596d75e07d196c8042205c Author: Cyril Hrubis metan@ucw.cz Date: Sun Feb 12 23:53:06 2012 +0100
tests: A better mixpixel test.
diff --git a/tests/SDL/mixpixeltest.c b/tests/SDL/mixpixeltest.c index a7ecc66..0f0d179 100644 --- a/tests/SDL/mixpixeltest.c +++ b/tests/SDL/mixpixeltest.c @@ -50,9 +50,9 @@ Uint32 timer_callback(__attribute__((unused)) Uint32 interval,
void draw_pixels(void) { - unsigned int i; + unsigned int i, j, k;
- GP_FillRect(&context, 0, 0, context.w, 50, white_pixel); + GP_FillRect(&context, 0, 0, context.w, 120, white_pixel);
unsigned int y = 20;
@@ -62,25 +62,44 @@ void draw_pixels(void) GP_MixPixel_Raw(&context, i + 20, y + 2, 0, i); GP_MixPixel_Raw(&context, i + 20, y + 3, 0, i); GP_MixPixel_Raw(&context, i + 20, y + 4, 0, i); + + GP_MixPixel_Raw(&context, i + 20, y + 5, red_pixel, i); + GP_MixPixel_Raw(&context, i + 20, y + 6, red_pixel, i); + GP_MixPixel_Raw(&context, i + 20, y + 7, red_pixel, i); + + GP_MixPixel_Raw(&context, i + 20, y + 8, green_pixel, i); + GP_MixPixel_Raw(&context, i + 20, y + 9, green_pixel, i); + GP_MixPixel_Raw(&context, i + 20, y + 10, green_pixel, i); + + GP_MixPixel_Raw(&context, i + 20, y + 11, blue_pixel, i); + GP_MixPixel_Raw(&context, i + 20, y + 12, blue_pixel, i); + GP_MixPixel_Raw(&context, i + 20, y + 13, blue_pixel, i); +
if (i % 16 == 0) - GP_PutPixel(&context, i + 20, y + 5, 0); + GP_PutPixel(&context, i + 20, y + 14, 0); if (i % 32 == 0) - GP_PutPixel(&context, i + 20, y + 6, 0); + GP_PutPixel(&context, i + 20, y + 15, 0); if (i % 64 == 0) { - GP_PutPixel(&context, i + 20, y + 7, 0); - GP_Print(&context, NULL, i + 20, y + 12, + GP_PutPixel(&context, i + 20, y + 16, 0); + GP_Print(&context, NULL, i + 20, y + 20, GP_ALIGN_CENTER | GP_VALIGN_BELOW, 0, 0, "%u", i); } if (i % 128 == 0) - GP_PutPixel(&context, i + 20, y + 8, 0); + GP_PutPixel(&context, i + 20, y + 17, 0); } - - y = 60; + + for (i = 0; i < 7; i++) + for (j = 0; j < 32; j++) + for (k = 0; k < 32; k++) + GP_MixPixel_Raw(&context, (225 * i) / 6 + j + 20, + y + k + 40, 0, (255 * i) / 6); + + y = 140;
for (i = 0; i <= 256; i++) { GP_MixPixel_Raw(&context, i + 20, y + 0, white_pixel, i); @@ -88,24 +107,41 @@ void draw_pixels(void) GP_MixPixel_Raw(&context, i + 20, y + 2, white_pixel, i); GP_MixPixel_Raw(&context, i + 20, y + 3, white_pixel, i); GP_MixPixel_Raw(&context, i + 20, y + 4, white_pixel, i); + + GP_MixPixel_Raw(&context, i + 20, y + 5, red_pixel, i); + GP_MixPixel_Raw(&context, i + 20, y + 6, red_pixel, i); + GP_MixPixel_Raw(&context, i + 20, y + 7, red_pixel, i); + + GP_MixPixel_Raw(&context, i + 20, y + 8, green_pixel, i); + GP_MixPixel_Raw(&context, i + 20, y + 9, green_pixel, i); + GP_MixPixel_Raw(&context, i + 20, y + 10, green_pixel, i); + + GP_MixPixel_Raw(&context, i + 20, y + 11, blue_pixel, i); + GP_MixPixel_Raw(&context, i + 20, y + 12, blue_pixel, i); + GP_MixPixel_Raw(&context, i + 20, y + 13, blue_pixel, i);
if (i % 16 == 0) - GP_PutPixel(&context, i + 20, y + 5, white_pixel); + GP_PutPixel(&context, i + 20, y + 14, white_pixel); if (i % 32 == 0) - GP_PutPixel(&context, i + 20, y + 6, white_pixel); + GP_PutPixel(&context, i + 20, y + 15, white_pixel); if (i % 64 == 0) { - GP_PutPixel(&context, i + 20, y + 7, white_pixel); - GP_Print(&context, NULL, i + 20, y + 12, + GP_PutPixel(&context, i + 20, y + 16, white_pixel); + GP_Print(&context, NULL, i + 20, y + 20, GP_ALIGN_CENTER | GP_VALIGN_BELOW, white_pixel, 0, "%u", i); }
if (i % 128 == 0) - GP_PutPixel(&context, i + 20, y + 8, white_pixel); + GP_PutPixel(&context, i + 20, y + 17, white_pixel); } - + + for (i = 0; i < 7; i++) + for (j = 0; j < 32; j++) + for (k = 0; k < 32; k++) + GP_MixPixel_Raw(&context, (225 * i) / 6 + j + 20, + y + k + 40, white_pixel, (255 * i) / 6);
}
-----------------------------------------------------------------------
Summary of changes: tests/SDL/mixpixeltest.c | 66 +++++++++++++++++++++++++++++++++++---------- 1 files changed, 51 insertions(+), 15 deletions(-)
repo.or.cz automatic notification. Contact project admin jiri.bluebear.dluhos@gmail.com if you want to unsubscribe, or site admin admin@repo.or.cz if you receive no reply.