gzz-commits
[Top][All Lists]
Advanced

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

[Gzz-commits] gzz/gzz/modules/pp PPView2.java vob/VobCSGenera...


From: Matti Katila
Subject: [Gzz-commits] gzz/gzz/modules/pp PPView2.java vob/VobCSGenera...
Date: Thu, 12 Dec 2002 10:35:03 -0500

CVSROOT:        /cvsroot/gzz
Module name:    gzz
Changes by:     Matti Katila <address@hidden>   02/12/12 10:35:03

Modified files:
        gzz/modules/pp : PPView2.java 
        gzz/modules/pp/vob: VobCSGenerator.java 

Log message:
        fix left-panel matching.

CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/gzz/gzz/modules/pp/PPView2.java.diff?tr1=1.25&tr2=1.26&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/gzz/gzz/modules/pp/vob/VobCSGenerator.java.diff?tr1=1.4&tr2=1.5&r1=text&r2=text

Patches:
Index: gzz/gzz/modules/pp/PPView2.java
diff -u gzz/gzz/modules/pp/PPView2.java:1.25 
gzz/gzz/modules/pp/PPView2.java:1.26
--- gzz/gzz/modules/pp/PPView2.java:1.25        Fri Dec  6 15:51:29 2002
+++ gzz/gzz/modules/pp/PPView2.java     Thu Dec 12 10:35:03 2002
@@ -165,7 +165,7 @@
            final GLVobCoorder glc = (GLVobCoorder)vs.coords;
            float[] sqs = new float[2];
            glc.getSqSize(frameCS, sqs);
-
+           if (sqs[1] < 5) return;
            pa("Sqs frame: "+sqs[0]+" "+sqs[1]);
 
            // CS from center of frameCS to screen
@@ -178,8 +178,6 @@
                                        bgscale, bgscale);
            
 
-
-
            final Cell cursor = context.getAccursed();
            final Cell plane = cursor.h(d.contains);
 
@@ -251,12 +249,21 @@
        int dir;
        VobScene vs;
        Buoy4Floater floater;
+       
+       // Nadir CS
+       final int nadir_point_cs;
+
        BFloater(int dir, VobScene vs) {
            this.dir = dir;
            this.vs = vs;
            floater = new CircleFloater4(vs, 0,
                centerX(vs), buoyCenterY, buoyRadius,
                centerX(vs) - dir * buoyRadius, buoyCenterY);
+
+           nadir_point_cs =  vs.orthoBoxCS(0, "nadir_frame"+dir, 0, 
+                                          leftPanelRealWidth + 0.5f*mainWidth,
+                                          mainHeight*2.0f,
+                                          1, 1, 2, 2);
        }
        public void buoy(final int anchor, final Cell c, Cell connectedFrom) {
            Object key ; 
@@ -267,23 +274,15 @@
            final int anchorUnit = vs.unitSqCS(anchor, "AUSQ"); 
            int actr = vs.translateCS(anchorUnit, "TR12", .5f, .5f);
            int buoycs = floater.buoyCoordsys(actr, key);
-  /*  BEGIN FROM HERE */
-           //vs.matcher.add(buoycs, "buoycs");
+          
+
+           final int nadir_buoy = 
((GLVobCoorder)vs.coords).nadirOrigin(buoycs, nadir_point_cs);
+           //vs.matcher.add(buoycs, nadir_buoy, "nadir_frameCS");
+           vs.matcher.add(nadir_buoy, "nadir_frameCS");
 
-           // Nadir CS
-           int nadir_point_cs = vs.orthoBoxCS(0, "nadir_frame", 0, 
-                                              leftPanelRealWidth + 
0.5f*mainWidth,
-                                              mainHeight*1.5f,
-                                              1, 1, 2, 2);
-           final int nadir = ((GLVobCoorder)vs.coords).nadirOrigin(buoycs, 
nadir_point_cs);
-           vs.matcher.add(nadir, "nadir_frameCS");
-
-   /* only one paper will be animated! */
-   /* if you enable this nothing animates */
-           //vs.matcher.add(buoycs, nadir,"B2N");
 
-           //final int frameCS = vs.orthoBoxCS(buoycs, "frame", 0, 
-           final int frameCS = vs.orthoBoxCS(nadir, "frame", 0, 
+           final int frameCS = vs.orthoBoxCS(buoycs, "frame", 0, 
+           //final int frameCS = vs.orthoBoxCS(nadir_buoy, "frame", 0, 
                    -buoyVPWidth/2, -buoyVPHeight/2, 1, 1, 
                    buoyVPWidth, buoyVPHeight);
            vs.activate(frameCS);
@@ -293,9 +292,9 @@
            int[] pan = getCoords(c);
            final int c2fCS = vs.coords.ortho(0, 0, 
                    -pan[0]*buoyZoom, -pan[1]*buoyZoom, buoyZoom, buoyZoom);
-           //vs.matcher.add(buoycs, c2fCS, "C2F");
-           vs.matcher.add(nadir, c2fCS, "C2F");
- /*  END TO HERE */
+           vs.matcher.add(buoycs, c2fCS, "C2F");
+           //vs.matcher.add(nadir_buoy, c2fCS, "C2F");
+
 
            buoyqueue.add(new Runnable() {
                public void run() {
@@ -464,35 +463,53 @@
                y += leftPanelObjectHeight) {
                int ctr, fr; 
                if (i==0) { 
-                   ctr = ((GLVobCoorder)vs.coords).affineCoordsys(0, 0,
+                   ctr = ((GLVobCoorder)vs.coords).affineCoordsys(0, 100,
                                                                   x, y, 1, 0, 
0, 1);
-                   fr = vs.orthoBoxCS(ctr, "frame", 10, 
+
+                   //vs.matcher.add(ctr, new Pair(p, null));
+                   //vs.matcher.add(ctr, new Pair(p, p));
+
+                   fr = vs.orthoBoxCS(ctr, "frame", 100, 
                                       -leftPanelRealWidth/2, 
-leftPanelRealHeight/2,
                                       1, 1, leftPanelRealWidth, 
leftPanelRealHeight);
                }
                else {
                    ctr = cs_gen.getNextCS(0);
+                   //vs.matcher.add(ctr, new Pair(p, p));
+                   //vs.matcher.add(ctr, new Pair(p, null));
                    fr = cs_gen.getNextCS(1);
+                   vs.matcher.add(ctr, fr, "frame");
                }
 
-               vs.matcher.add(ctr, new Pair(p, null));
+               ((DefaultVobMatcher)vs.matcher).dumpByParent(ctr);
+
+
+               //vs.matcher.add(ctr, new Pair(p, null));
+               vs.matcher.add(ctr, new Pair(p, p));
                vs.activate(fr);
 
-               int c2f = vs.coords.ortho(0, 0, 0, 0, 
+               int c2f = vs.coords.ortho(0, 11, 0, 0, 
                                          leftPanelZoom, leftPanelZoom);
-               vs.matcher.add(ctr, c2f, "C2F"+ y);
+               vs.matcher.add(ctr, c2f, "C2F");
 
+               pa(" ctr: "+ctr+
+                  " fr: "+fr+
+                  " c2f: "+c2f);
 
                buoy_vc.setAccursed(p);
                buoy_singlePlane.render(vs, fr, c2f);
                p = p.s(d.d1);
+               
                i++;
            }
+           pa("********************************************************");
+           //((DefaultVobMatcher)vs.matcher).dumbByParent();
        }
        
        
     }
 
+
     int curlinkY = 0;
     // XXX more params!
     private void placeLinkbuoys(VobScene vs, Cell otherNote) {
@@ -505,9 +522,9 @@
        else { curlinkY ++; curlinkY = -curlinkY; }
     }
 
+
     private void placeLinkbuoy(VobScene vs, Cell otherNote, 
                               int[] coords, Pair key, int dir) {
-
        int ctr = ((GLVobCoorder)vs.coords).affineCoordsys(0, 0,
                                                           centerX(vs) + dir * 
buoyRadius, 
                                                           mainY + mainHeight/2 
+ curlinkY * linkbuoyVPHeight,
@@ -529,6 +546,8 @@
 
     }
 
+
+
     /** 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().
@@ -612,6 +631,7 @@
            return null;
        }
 
+
        if(!"frame".equals(vs.matcher.getKey(cs))) {
            try {
                if ("new_paper_button_frame".equals(vs.matcher.getKey(cs)) ) {
@@ -629,7 +649,7 @@
            } catch (Exception e) { pa(e.getMessage()); }
            return null;
        }
-
+       
        // Get its parent
        int vp = ((GLVobCoorder)vs.coords).getParent(cs);
        if ("Nadir".equals(((GLVobCoorder)vs.coords).getCoordSystemStr(vp))) {
Index: gzz/gzz/modules/pp/vob/VobCSGenerator.java
diff -u gzz/gzz/modules/pp/vob/VobCSGenerator.java:1.4 
gzz/gzz/modules/pp/vob/VobCSGenerator.java:1.5
--- gzz/gzz/modules/pp/vob/VobCSGenerator.java:1.4      Wed Dec  4 16:20:50 2002
+++ gzz/gzz/modules/pp/vob/VobCSGenerator.java  Thu Dec 12 10:35:03 2002
@@ -111,10 +111,9 @@
            vob_cs[i][0] = ((GLVobCoorder)vs.coords).affineCoordsys(0, 0,
                                                                    x_center, 
y_tmp + muutos/2,  
                                                                    1, 0, 0, 1);
-           //float vob_width2 = y_d;
-           vob_cs[i][1] = vs.orthoBoxCS(vob_cs[i][0], "frame", 10, 
-                                        -vob_width/2, -y_d/2,
-                                        1, 1, vob_width, y_d);
+           vob_cs[i][1] = vs.coords.orthoBox(vob_cs[i][0], 10, 
+                                             -vob_width/2, -y_d/2, 1,1,
+                                             vob_width, y_d);
 
            if (dbg) {
                if (i == focus_index) pa("y_tmp: "+ y_tmp +" y_cent: " 
+(y-muutos/2) +



reply via email to

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