Subversion Repositories planix.SVN

Rev

Rev 2 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
2 - 1
#include <u.h>
2
#include <libc.h>
3
#include <draw.h>
4
#include <memdraw.h>
5
#include <memlayer.h>
6
 
7
extern int drawdebug;
8
void
9
main(int argc, char **argv)
10
{
11
	char cc;
12
	Memimage *x;
13
	Point c = {208,871};
14
	int a = 441;
15
	int b = 441;
16
	int thick = 0;
17
	Point sp = {0,0};
18
	int alpha = 51;
19
	int phi = 3;
20
	vlong t0, t1;
21
	int i, n;
22
	vlong del;
23
 
24
	memimageinit();
25
 
26
	x = allocmemimage(Rect(0,0,1000,1000), CMAP8);
27
	n = atoi(argv[1]);
28
 
29
	t0 = nsec();
30
	t0 = nsec();
31
	t0 = nsec();
32
	t1 = nsec();
33
	del = t1-t0;
34
	t0 = nsec();
35
	for(i=0; i<n; i++)
36
		memarc(x, c, a, b, thick, memblack, sp, alpha, phi, SoverD);
37
	t1 = nsec();
38
	print("%lld %lld\n", t1-t0-del, del);
39
}
40
 
41
int drawdebug = 0;
42
 
43
void
44
rdb(void)
45
{
46
}
47
 
48
int
49
iprint(char *fmt, ...)
50
{
51
	int n;	
52
	va_list va;
53
	char buf[1024];
54
 
55
	va_start(va, fmt);
56
	n = doprint(buf, buf+sizeof buf, fmt, va) - buf;
57
	va_end(va);
58
 
59
	write(1,buf,n);
60
	return 1;
61
}
62