/[gzz]/gzz/gzz/modules/pp/PPView2.java
ViewVC logotype

Diff of /gzz/gzz/modules/pp/PPView2.java

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.19 by mudyc, Tue Nov 26 07:48:49 2002 UTC revision 1.20 by mudyc, Fri Nov 29 18:31:04 2002 UTC
# Line 401  public class PPView2 implements View { Line 401  public class PPView2 implements View {
401              vs.map.put(new_button, button_cs);              vs.map.put(new_button, button_cs);
402    
403    
404                // count papers
405              Cell p = main_vc.getAccursed().h(d.contains).h(d.d1).s(d.d1);              Cell p = main_vc.getAccursed().h(d.contains).h(d.d1).s(d.d1);
406                Cell accursed_p = main_vc.getAccursed();
407                int paper_count=0;
408                int accursed_paper_count=0;
409                for (; p!=null; paper_count++) {
410                    if (p==accursed_p) accursed_paper_count = paper_count;
411                    p = p.s(d.d1);
412                }
413    
414                // subtraction because of the home-paper
415                if (paper_count > 0) { paper_count--; accursed_paper_count--; }
416                
417                float home_paper_bottom = 210;
418                int papers_sq = vs.orthoCS(0, "empty", 0,
419                                     0, home_paper_bottom,
420                                     leftPanelWidth, mainHeight - home_paper_bottom);
421                VobCSGenerator cs_gen =
422                    new VobCSGenerator(vs, papers_sq, paper_count, accursed_paper_count,
423                                       leftPanelRealWidth, leftPanelRealHeight);
424                
425                p = main_vc.getAccursed().h(d.contains).h(d.d1).s(d.d1);
426              float x = 0.5f * leftPanelWidth;              float x = 0.5f * leftPanelWidth;
427    
428                int i=0;
429              for(float y = 1.5f*leftPanelObjectHeight; p != null;              for(float y = 1.5f*leftPanelObjectHeight; p != null;
430                  y += leftPanelObjectHeight) {                  y += leftPanelObjectHeight) {
431                  int ctr = ((GLVobCoorder)vs.coords).affineCoordsys(0, 0,                  int ctr, fr;
432                    if (i==0) {
433                        ctr = ((GLVobCoorder)vs.coords).affineCoordsys(0, 0,
434                                                                     x, y, 1, 0, 0, 1);                                                                     x, y, 1, 0, 0, 1);
435                  vs.matcher.add(ctr, new Pair(p, null));                      fr = vs.orthoBoxCS(ctr, "frame", 10,
   
                 int fr = vs.orthoBoxCS(ctr, "frame", 10,  
436                                         -leftPanelRealWidth/2, -leftPanelRealHeight/2,                                         -leftPanelRealWidth/2, -leftPanelRealHeight/2,
437                                         1, 1, leftPanelRealWidth, leftPanelRealHeight);                                         1, 1, leftPanelRealWidth, leftPanelRealHeight);
438                        pa("y:"+ y +" x: "+ x);
439                    }
440                    else {
441                        ctr = cs_gen.getNextCS(0);
442                        fr = cs_gen.getNextCS(1);
443                        pa("ctr: "+ ctr +" fr: "+fr);
444                    }
445    
446                    vs.matcher.add(ctr, new Pair(p, null));
447                  vs.activate(fr);                  vs.activate(fr);
448    
449                  int c2f = vs.coords.ortho(0, 0, 0, 0,                  int c2f = vs.coords.ortho(0, 0, 0, 0,
# Line 423  public class PPView2 implements View { Line 454  public class PPView2 implements View {
454                  buoy_vc.setAccursed(p);                  buoy_vc.setAccursed(p);
455                  buoy_singlePlane.render(vs, fr, c2f);                  buoy_singlePlane.render(vs, fr, c2f);
456                  p = p.s(d.d1);                  p = p.s(d.d1);
457                    i++;
458              }              }
459          }          }
460                    

Legend:
Removed from v.1.19  
changed lines
  Added in v.1.20

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26