X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ian/git?p=moebius.git;a=blobdiff_plain;f=dualx11.cc;h=6a2edd5a796aeaac6e8e6fe288b62ea39cd0a9dd;hp=5c40ba2ea2d93c683f52f4829c06a3895dfb4a1f;hb=423c7eda1487df41623921cb5b4b83030ee1006a;hpb=85404b5bbd63c12d7bbef6143bbdcb1e4a41dbe8;ds=sidebyside diff --git a/dualx11.cc b/dualx11.cc index 5c40ba2..6a2edd5 100644 --- a/dualx11.cc +++ b/dualx11.cc @@ -63,21 +63,36 @@ DualX11Output::~DualX11Output() { XCloseDisplay(display); } -void DualX11Output::drawcell(const Point* list, int n) { - static Parameter eyeseparation("eyesep", - "Distance from projection eye to origin", - 0.3, .1, 0., 100.); +void DualX11Output::drawcell(const Point* list, int n, Colour colour) { + static Parameter + eyeseparation("eyesep", "Distance from projection eye to origin", + 0.3, .1, 0., 100.); + for (int i=0; i<2; i++) { + GC fill; + bool draw; + Point::seteyex(eyeseparation*(i-0.5)); + + switch (colour) { + case grid: fill= fabric[i]; draw= true; break; + case solidblack: fill= fabric[i]; draw= false; break; + case solidwhite: fill= mesh[i]; draw= false; break; + default: abort(); + } + XPoint xp[n+1]; for (int j=0; j