home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The World of Computer Software
/
World_Of_Computer_Software-02-387-Vol-3of3.iso
/
x
/
x11p-13.zip
/
RCS
/
do_scroll.c,v
< prev
next >
Wrap
Text File
|
1989-05-04
|
2KB
|
167 lines
head 2.2;
access ;
symbols pre-merge:2.0;
locks ; strict;
comment @ * @;
2.2
date 89.05.04.14.27.41; author joel; state Exp;
branches ;
next 2.1;
2.1
date 89.05.03.14.17.55; author joel; state Exp;
branches ;
next 2.0;
2.0
date 89.01.31.17.05.42; author erik; state Exp;
branches ;
next 1.2;
1.2
date 89.01.31.17.05.42; author joel; state Exp;
branches ;
next 1.1;
1.1
date 88.08.15.16.38.04; author susan; state Exp;
branches ;
next ;
desc
@Scrolling test
@
2.2
log
@Merged into do_copyarea.c
@
text
@@
2.1
log
@Massive changes, I'm not going to go into details.
@
text
@a0 68
#include "x11perf.h"
#define NUMPOINTS 100
static GC bggc, fggc;
static Window w;
static XRectangle ws[3] = {
{100, 100, 200, 200},
{150, 150, 200, 200},
{200, 200, 200, 200}
};
static XPoint points[NUMPOINTS];
Bool InitScrolling(d, p)
Display *d;
Parms p;
{
int i;
XGCValues gcv;
w = None;
i = 0;
for (i = 0; i < NUMPOINTS; i++)
{
points[i].x = rand() % WIDTH;
points[i].y = rand() % HEIGHT;
}
CreatePerfStuff(d, 1, WIDTH, HEIGHT, &w, &bggc, &fggc);
XDrawLines(d, w, fggc, points, NUMPOINTS, CoordModeOrigin);
XSync(d, 0);
return True;
}
void DoScrolling(d, p)
Display *d;
Parms p;
{
int i;
for (i=0; i<p->reps; i++)
{
XCopyArea(d, w, w, fggc, 0, 10, WIDTH, HEIGHT - 10, 0, 0);
/*
XCopyArea(d, w, w, fggc, 1, 10, WIDTH-1, HEIGHT - 10, 0, 0);
*/
}
}
void MidScroll(d, p)
Display *d;
Parms p;
{
XDrawLines(d, w, fggc, points, NUMPOINTS, CoordModeOrigin);
XSync(d, 0);
}
void EndScrolling(d, p)
Display *d;
Parms p;
{
int i;
if (w != None)
XDestroyWindow(d, w);
XFreeGC(d, bggc);
XFreeGC(d, fggc);
}
@
2.0
log
@version from /usr/src/pmax
@
text
@d14 1
a14 1
void InitScrolling(d, p)
d31 1
@
1.2
log
@Added -fg -bg capabilities
@
text
@@
1.1
log
@Initial revision
@
text
@d5 1
a5 1
static GC whitegc, blackgc;
d28 2
a29 2
CreatePerfStuff(d, 1, WIDTH, HEIGHT, &w, &whitegc, &blackgc);
XDrawLines(d, w, blackgc, points, NUMPOINTS, CoordModeOrigin);
d42 4
a45 1
XCopyArea(d, w, w, blackgc, 0, 10, WIDTH, HEIGHT - 10, 0, 0);
d53 1
a53 1
XDrawLines(d, w, blackgc, points, NUMPOINTS, CoordModeOrigin);
d64 2
a65 2
XFreeGC(d, whitegc);
XFreeGC(d, blackgc);
@