testnr.cpp revision 6b15695578f07a3f72c4c9475c1a261a3021472a
#define __TESTNR_C__
/*
* Pixel buffer rendering library
*
* Authors:
* Lauris Kaplinski <lauris@kaplinski.com>
*
* This code is in public domain
*/
# include <windows.h>
#include <glib.h>
#endif
#include "nr-blit.h"
static double
get_time (void)
{
g_get_current_time (&tv);
}
static unsigned int
rand_byte (void)
{
}
int
{
NRPixBlock d, m[16];
int count, i;
printf ("Initializing buffers\n");
/* Destination */
d.empty = 0;
/* Masks */
for (i = 0; i < 16; i++) {
int r, b, c;
for (r = 0; r < 64; r++) {
unsigned int q;
unsigned char *p;
p = NR_PIXBLOCK_PX (&m[i]) + r * m[i].rs;
for (b = 0; b < 8; b++) {
q = rand_byte ();
if (q < 120) {
for (c = 0; c < 8; c++) *p++ = 0;
} else if (q < 240) {
for (c = 0; c < 8; c++) *p++ = 255;
} else {
for (c = 0; c < 8; c++) *p++ = rand_byte ();
}
}
}
m[i].empty = 0;
}
printf ("Random transparency\n");
count = 0;
unsigned char r, g, b, a;
r = rand_byte ();
g = rand_byte ();
b = rand_byte ();
a = rand_byte ();
for (i = 0; i < 16; i++) {
count += 1;
}
}
return 0;
}