summaryrefslogtreecommitdiff
path: root/math/femlab/files/patch-ab
diff options
context:
space:
mode:
Diffstat (limited to 'math/femlab/files/patch-ab')
-rw-r--r--math/femlab/files/patch-ab55
1 files changed, 55 insertions, 0 deletions
diff --git a/math/femlab/files/patch-ab b/math/femlab/files/patch-ab
new file mode 100644
index 000000000000..2dd2078f1569
--- /dev/null
+++ b/math/femlab/files/patch-ab
@@ -0,0 +1,55 @@
+*** source/graph.c.orig Sat Sep 13 16:23:18 1997
+--- source/graph.c Sat Sep 13 16:39:13 1997
+***************
+*** 608,614 ****
+ void getDrawingScale()
+ {
+ float xoff, yoff;
+! float scl;
+ int width, height;
+ int ww;
+ int nx, ny, id;
+--- 608,614 ----
+ void getDrawingScale()
+ {
+ float xoff, yoff;
+! float iscl; /* inverse scale */
+ int width, height;
+ int ww;
+ int nx, ny, id;
+***************
+*** 630,645 ****
+ width = width / nx;
+ height = height / ny;
+
+! if(state > HAVE_NOTHING){
+! scl = 1./max(xmax-xmin,ymax-ymin);
+! xoff = -scl*(xmin+.5*(xmax-xmin)-.5/scl);
+! yoff = -scl*(ymin+.5*(ymax-ymin)-.5/scl);
+
+! xoff = - xmin*scl*.85;
+! yoff = - ymin*scl*.85;
+
+ ww = min(width, height);
+! Xscl = (int) ((float)ww * 0.85 * scl);
+ Xxoff = (int) ww * xoff ;
+ Xyoff = (int) ww * yoff;
+ Xxoff += (int) (width - ( Xscl*xmax +Xxoff))/2 + (id+nx-1)%nx *width;
+--- 630,646 ----
+ width = width / nx;
+ height = height / ny;
+
+! iscl = max(xmax-xmin,ymax-ymin);
+
+! if((state > HAVE_NOTHING) && (iscl != 0.0)){
+! xoff = .5-(xmin+.5*(xmax-xmin))/iscl;
+! yoff = .5-(ymin+.5*(ymax-ymin))/iscl;
+!
+! xoff = - xmin*.85/iscl;
+! yoff = - ymin*.85/iscl;
+
+ ww = min(width, height);
+! Xscl = (int) ((float)ww * 0.85 / iscl);
+ Xxoff = (int) ww * xoff ;
+ Xyoff = (int) ww * yoff;
+ Xxoff += (int) (width - ( Xscl*xmax +Xxoff))/2 + (id+nx-1)%nx *width;