8 X11Output::X11Output() {
10 display= XOpenDisplay(0);
11 window= XCreateSimpleWindow(display,
12 DefaultRootWindow(display),
14 gcvalues.background= 0;
15 fabric= XCreateGC(display,window,GCBackground,&gcvalues);
16 gcvalues.foreground= 1;
17 gcvalues.background= 1;
18 mesh= XCreateGC(display,window,GCForeground|GCBackground,&gcvalues);
19 XSelectInput(display,window,0);
20 XMapWindow(display,window);
24 void X11Output::startimage() {
25 XClearWindow(display,window);
28 void X11Output::endimage() {
32 X11Output::~X11Output() {
33 XCloseDisplay(display);
36 void X11Output::drawcell(const Point* list, int n) {
38 for (int i=0; i<n; i++) {
39 Onscreen here= Onscreen(list[i]);
40 xp[i].x= (int)((here.x+1.0)*250.0);
41 xp[i].y= (int)((-here.y+1.0)*250.0);
43 XFillPolygon(display,window,fabric,xp,n,Nonconvex,CoordModeOrigin);
45 XDrawLines(display,window,mesh,xp,n+1,CoordModeOrigin);