gzz-commits
[Top][All Lists]
Advanced

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

[Gzz-commits] gzz/gzz modules/pp2/PPCanvasCursor.java modules...


From: Matti Katila
Subject: [Gzz-commits] gzz/gzz modules/pp2/PPCanvasCursor.java modules...
Date: Sun, 09 Feb 2003 02:14:17 -0500

CVSROOT:        /cvsroot/gzz
Module name:    gzz
Changes by:     Matti Katila <address@hidden>   03/02/09 02:14:17

Modified files:
        gzz/modules/pp2: PPCanvasCursor.java PPCanvasNode.java 
        gzz/view/buoy  : buoymanager.py 
Removed files:
        gzz/view/buoy  : AbstractAnimationNode.java 

Log message:
        closer to animations in buoymanager

CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/gzz/gzz/modules/pp2/PPCanvasCursor.java.diff?tr1=1.6&tr2=1.7&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/gzz/gzz/modules/pp2/PPCanvasNode.java.diff?tr1=1.8&tr2=1.9&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/gzz/gzz/view/buoy/buoymanager.py.diff?tr1=1.13&tr2=1.14&r1=text&r2=text

Patches:
Index: gzz/gzz/modules/pp2/PPCanvasCursor.java
diff -u gzz/gzz/modules/pp2/PPCanvasCursor.java:1.6 
gzz/gzz/modules/pp2/PPCanvasCursor.java:1.7
--- gzz/gzz/modules/pp2/PPCanvasCursor.java:1.6 Sat Feb  8 05:19:20 2003
+++ gzz/gzz/modules/pp2/PPCanvasCursor.java     Sun Feb  9 02:14:17 2003
@@ -39,8 +39,8 @@
 
 /** XXX
  */
-public class PPCanvasCursor extends AbstractAnimationNode {
-    private static final String rcsid = "$Id: PPCanvasCursor.java,v 1.6 
2003/02/08 10:19:20 mudyc Exp $";  
+public class PPCanvasCursor implements BuoyViewMainNode {
+private static final String rcsid = "$Id: PPCanvasCursor.java,v 1.7 2003/02/09 
07:14:17 mudyc Exp $";  
     public static boolean dbg = false;
     private static void pa(String s) { 
System.out.println("PPCanvasCursor:"+s); }
 
@@ -141,20 +141,10 @@
 
 
     public void renderMain(VobScene vs, int into) {
-       int mainctr = vs.translateCS(0, "MAINVPCTR",
-                                    centerX(vs), mainY + mainHeight/2);
-
-       int frameCS = vs.orthoBoxCS(mainctr, "MAINVP", 10, 
-                                   (-mainWidth)/2, -mainHeight/2, 1, 1, 
-                                   mainWidth, mainHeight);
-       vs.activate(frameCS);
-                       
-       // cell to frame CS
        int c2fCS = vs.coords.ortho(0, 0, 0, 0, 10, 10);
-       vs.matcher.add(frameCS, c2fCS, "C2F");
-       SinglePaper.i(avc, d, window, current).render(vs, frameCS, c2fCS);
+       vs.matcher.add(into, c2fCS, "C2F");
+       SinglePaper.i(avc, d, window, current).render(vs, into, c2fCS);
        hook.placed(current, vs, into, (ViewContext)avc);
-
     }
 
     public void keystroke(String s) {
Index: gzz/gzz/modules/pp2/PPCanvasNode.java
diff -u gzz/gzz/modules/pp2/PPCanvasNode.java:1.8 
gzz/gzz/modules/pp2/PPCanvasNode.java:1.9
--- gzz/gzz/modules/pp2/PPCanvasNode.java:1.8   Sat Feb  8 05:19:20 2003
+++ gzz/gzz/modules/pp2/PPCanvasNode.java       Sun Feb  9 02:14:17 2003
@@ -33,7 +33,7 @@
 /** XXX
  */
 public class PPCanvasNode implements CellBuoyViewNodeType {
-private static final String rcsid = "$Id: PPCanvasNode.java,v 1.8 2003/02/08 
10:19:20 mudyc Exp $";  
+private static final String rcsid = "$Id: PPCanvasNode.java,v 1.9 2003/02/09 
07:14:17 mudyc Exp $";  
     public static boolean dbg = false;
     private static void pa(String s) { System.out.println("PPCanvasNode:"+s); }
 
@@ -77,9 +77,6 @@
 
     public int renderBuoy(VobScene vs, int into, Cell c, Object content,
                            Object cachedSize) {
-       pa("Tee poiju!!!");
-
-       vs.activate(into);
        // XXX Pan
        int[] pan = getCoords(c);
        final int c2fCS = 
Index: gzz/gzz/view/buoy/buoymanager.py
diff -u gzz/gzz/view/buoy/buoymanager.py:1.13 
gzz/gzz/view/buoy/buoymanager.py:1.14
--- gzz/gzz/view/buoy/buoymanager.py:1.13       Fri Feb  7 07:49:28 2003
+++ gzz/gzz/view/buoy/buoymanager.py    Sun Feb  9 02:14:17 2003
@@ -51,12 +51,17 @@
        center = vs.translateCS(0, "Center", self.ctrx, self.ctry)
 
        main = vs.orthoBoxCS(center, "MAINVP", 0, 
-                               -mainsize/2, -mainsize/2, 1, 1, mainsize, 
mainsize)
+                             -mainsize/2, -mainsize/2, 1, 1, mainsize, 
mainsize)
        self.vs.activate(main)
 
        self.mainNode.renderMain(vs, self.nadir(main))
        self.cs[main] = None
-
+        
+        if hasattr(self, "animationCS_buoy"):
+            # Interpolation : buoy -> to main vp
+            self.vs.matcher.keymapSingleCoordsys(main,
+                                                 self.animationCS_buoy)
+        self.mainCS = main
 
     def link(self, direction, anchorCS, otherNode, linkId, otherAnchor):
        x = self.ctrx
@@ -94,12 +99,25 @@
            PopAttrib
        """))
 
+        print 'Link ID: ', linkId
+        if hasattr(self, "animationCS_main") and \
+               self.animationCS_main != None and \
+               linkId == self.animationCS_main[1]:
+            print 'Main to Buoy interpolation..'
+            # Interpolation : mainvp -> to buoy
+            self.vs.matcher.keymapSingleCoordsys(into,
+                                                 self.animationCS_main[0])
+            self.animationCS_main = None
+
 
     def key(self, key):
        gzz.client.AbstractUpdateManager.chg()
        pass
 
     def mouse(self, ev):
+        if ev.getID() == ev.MOUSE_PRESSED:
+            return
+        
        # print ev
        x, y = ev.getX(), ev.getY()
        cs = self.vs.getCSAt(0, x, y, None)
@@ -112,5 +130,9 @@
                gzz.client.AbstractUpdateManager.chg()
        else:
            self.mainNode = link[0].createMainNode(link[1], link[2], self)
+
+            self.animationCS_buoy = cs
+            self.animationCS_main = [self.mainCS, link]
+
            gzz.client.AbstractUpdateManager.chg()
            




reply via email to

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