chiark
/
gitweb
/
~ian
/
moebius.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
X window size is a parameter; scale is a parameter; whether to draw original strip...
[moebius.git]
/
dualx11.cc
diff --git
a/dualx11.cc
b/dualx11.cc
index dbd3e4b84a8d5a849dac18a65a40c06c38dcbdf6..5c40ba2ea2d93c683f52f4829c06a3895dfb4a1f 100644
(file)
--- a/
dualx11.cc
+++ b/
dualx11.cc
@@
-5,6
+5,9
@@
#include "dualx11.hh"
#include "parameter.hh"
#include "dualx11.hh"
#include "parameter.hh"
+static Parameter<int> dualx11size("dualx11size", "Dual X11 window size",
+ 500, 100, 10, 10000);
+
DualX11Output::DualX11Output() {
display= XOpenDisplay(0);
Colormap cmap= DefaultColormap(display,DefaultScreen(display));
DualX11Output::DualX11Output() {
display= XOpenDisplay(0);
Colormap cmap= DefaultColormap(display,DefaultScreen(display));
@@
-26,7
+29,7
@@
DualX11Output::DualX11Output() {
window= XCreateSimpleWindow(display,
DefaultRootWindow(display),
window= XCreateSimpleWindow(display,
DefaultRootWindow(display),
- 0,0,
500,500
, 0,0, pixelbase);
+ 0,0,
dualx11size,dualx11size
, 0,0, pixelbase);
XGCValues gcvalues;
int i;
XGCValues gcvalues;
int i;
@@
-69,8
+72,8
@@
void DualX11Output::drawcell(const Point* list, int n) {
XPoint xp[n+1];
for (int j=0; j<n; j++) {
Onscreen here= Onscreen(list[j]);
XPoint xp[n+1];
for (int j=0; j<n; j++) {
Onscreen here= Onscreen(list[j]);
- xp[j].x= (int)((here.x+1.0)*
250.0
);
- xp[j].y= (int)((-here.y+1.0)*
250.0
);
+ xp[j].x= (int)((here.x+1.0)*
(dualx11size*0.5)
);
+ xp[j].y= (int)((-here.y+1.0)*
(dualx11size*0.5)
);
}
XFillPolygon(display,window,fabric[i],xp,n,Nonconvex,CoordModeOrigin);
xp[n]= xp[0];
}
XFillPolygon(display,window,fabric[i],xp,n,Nonconvex,CoordModeOrigin);
xp[n]= xp[0];