/[fenfire]/fenfire/org/fenfire/modules/pp/SinglePaper.java
ViewVC logotype

Diff of /fenfire/org/fenfire/modules/pp/SinglePaper.java

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

revision 1.13 by tjl, Fri Apr 25 11:19:39 2003 UTC revision 1.14 by mudyc, Mon Apr 28 11:17:16 2003 UTC
# Line 43  private static final String rcsid = "$Id Line 43  private static final String rcsid = "$Id
43          return i();          return i();
44      }      }
45    
46      /** Set the instance. This is usually made with i() method.      /** Set the instance.
47       */       */
48      public void set(Fen fen, GraphicsAPI.Window win,      public void set(Fen fen, GraphicsAPI.Window win,
49                      NodeView nodeview) {                      NodeView nodeview) {
# Line 110  private static final String rcsid = "$Id Line 110  private static final String rcsid = "$Id
110          final int bg2screen = vs.scaleCS(paper2screen, "BGSCA",          final int bg2screen = vs.scaleCS(paper2screen, "BGSCA",
111                                           bgscale, bgscale);                                           bgscale, bgscale);
112        
113          // BgVob takes two coordsys:          final int frameUnit = vs.unitSqCS(frameCS, "USQ");
         // frame2screen and paper2screen  
         final BgVob bg = BgVob.create(node, window);  
   
         final int frameUnit = vs.unitSqCS(frameCS, "USQ");  
114    
115          final int frameUnit2paper = vs.orthoCS(inversePanZoom, "PZIN", 0,          final int frameUnit2paper = vs.orthoCS(inversePanZoom, "PZIN", 0,
116  //                                      -sqs[0], -sqs[1], sqs[0], sqs[1]);  //                                      -sqs[0], -sqs[1], sqs[0], sqs[1]);
# Line 135  private static final String rcsid = "$Id Line 131  private static final String rcsid = "$Id
131    
132          Runnable placeContent = new Runnable() {          Runnable placeContent = new Runnable() {
133                  public void run() {                  public void run() {
134                        // BgVob takes two coordsys:
135                        // frame2screen and paper2screen
136                        final BgVob bg = BgVob.create(node, window);
137    
138                      // XXX Unclean!                      // XXX Unclean!
139                      // vs.map.put(bg, frameUnit, bg2screen);                      // vs.map.put(bg, frameUnit, bg2screen);
140                      bg.put(vs, frameUnit, bg2screen);                      bg.put(vs, frameUnit, bg2screen);
141                      vs.map.put(black);                      vs.map.put(black);
142    
143                      //coordinatePlaneView.render(vs, paper2screen_shifted,                      spatialplane.render(vs, paper2screen_shifted,
144                      //                 node, frameCS, space, hook_final);                                          node, frameCS, fen, hook_final, nv);
   
                     spatialplane.renderGL(vs, paper2screen_shifted,  
                                           node, frameCS, fen, hook_final, nv);  
145                  }};                  }};
146    
147          if (GraphicsAPI.getInstance() instanceof GLAPI) {          if (GraphicsAPI.getInstance() instanceof GLAPI) {
# Line 164  private static final String rcsid = "$Id Line 161  private static final String rcsid = "$Id
161                  placeContent.run();                  placeContent.run();
162              }              }
163          } else {          } else {
164              // XXX Need some work - later              // kludge.. (history and awt..)
165    
166                float [] pan = vs.coords.transformPoints3(inversePanZoom, new float[3], null);
167                float[] zsize = new float[2];
168                vs.coords.getSqSize(frameCS, zsize);
169                
170                pa("zoom: " +zsize[0]);
171    
172              int zoom = 1;              int zo = (int)(zsize[0] * 100000);
173              int panx=0, pany=0;              int geometry = vs.orthoBoxCS(frameCS, "FocusGeometry",0, zo,0, 1,1, -pan[0], -pan[1]);  
174              int into = 0;              vs.map.put(new UniquePaperVob(paper.toString()), frameCS, geometry);
175                spatialplane.render(vs, paper2screen_shifted,
176              int zo = (int)(zoom * 100000);                                    node, frameCS, fen, hook_final, nv);
             int geometry = vs.orthoBoxCS(into, "FocusGeometry",0, zo,0, 1,1, -panx, -pany);    
             vs.map.put(new UniquePaperVob(paper.toString()), into, geometry);  
             spatialplane.renderAWT(vs, into, geometry, node, nv, fen ,hook);  
177          }          }
178      }      }
179  }  }

Legend:
Removed from v.1.13  
changed lines
  Added in v.1.14

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