gzz-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Gzz-commits] fenfire/org/fenfire/view/buoy MainNode2D.java


From: Tuomas J. Lukka
Subject: [Gzz-commits] fenfire/org/fenfire/view/buoy MainNode2D.java
Date: Fri, 25 Apr 2003 09:54:58 -0400

CVSROOT:        /cvsroot/fenfire
Module name:    fenfire
Changes by:     Tuomas J. Lukka <address@hidden>        03/04/25 09:54:58

Modified files:
        org/fenfire/view/buoy: MainNode2D.java 

Log message:
        Fix zooming center

CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/fenfire/fenfire/org/fenfire/view/buoy/MainNode2D.java.diff?tr1=1.7&tr2=1.8&r1=text&r2=text

Patches:
Index: fenfire/org/fenfire/view/buoy/MainNode2D.java
diff -u fenfire/org/fenfire/view/buoy/MainNode2D.java:1.7 
fenfire/org/fenfire/view/buoy/MainNode2D.java:1.8
--- fenfire/org/fenfire/view/buoy/MainNode2D.java:1.7   Fri Apr 25 08:49:29 2003
+++ fenfire/org/fenfire/view/buoy/MainNode2D.java       Fri Apr 25 09:54:58 2003
@@ -72,6 +72,7 @@
     private int focusFrame = -1;
     private int box2paper = -1;
     private float w, h;
+
     public void renderMain(VobScene vs, int into) {
        vs.coords.getSqSize(into, tmp);
        w = tmp[0]; h = tmp[1];
@@ -84,6 +85,19 @@
 
        view.render(vs, plane, into, into, box2paper);
     }
+
+    /** Cause the changes to the zooming and panning variables
+     * to be shown in the given vobscene.
+     * This changes the parameters of the coordinate systems 
+     * created by render().
+     */
+    private void setZoomPan(VobScene vs, int mainFrame) {
+       DefaultVobMatcher m = (DefaultVobMatcher)vs.matcher;
+       vs.coords.setOrthoBoxParams(box2paper, 0, 
+                       panX-w/zoom/2, panY-h/zoom/2, 
+                                   1/zoom, 1/zoom, w, h);
+    }
+
     public void keystroke(String s) {
        // XXX
     }
@@ -153,14 +167,4 @@
        return false;
     }
 
-
-    /** Cause the changes to the zooming and panning variables
-     * to be shown in the given vobscene.
-     * This changes the parameters of the coordinate systems created by 
render().
-     */
-    private void setZoomPan(VobScene vs, int mainFrame) {
-       DefaultVobMatcher m = (DefaultVobMatcher)vs.matcher;
-       vs.coords.setOrthoBoxParams(box2paper, 0, panX-w*zoom/2, panY-h*zoom/2, 
-                                   1/zoom, 1/zoom, w, h);
-    }
 }




reply via email to

[Prev in Thread] Current Thread [Next in Thread]