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

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

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

revision 1.5 by mudyc, Tue Apr 8 14:54:14 2003 UTC revision 1.6 by mudyc, Tue Apr 8 20:05:03 2003 UTC
# Line 9  import org.fenfire.util.*; Line 9  import org.fenfire.util.*;
9  import org.fenfire.view.*;  import org.fenfire.view.*;
10  import org.fenfire.view.buoy.*;  import org.fenfire.view.buoy.*;
11  import org.nongnu.libvob.*;  import org.nongnu.libvob.*;
12    import org.nongnu.libvob.impl.gl.*;
13  import org.nongnu.libvob.buoy.*;  import org.nongnu.libvob.buoy.*;
14    
15  import org.nongnu.storm.*;  import org.nongnu.storm.*;
# Line 82  private static final String rcsid = "$Id Line 83  private static final String rcsid = "$Id
83       */       */
84      public int renderBuoy(VobScene vs, int into, RDFNode node, Object content,      public int renderBuoy(VobScene vs, int into, RDFNode node, Object content,
85                     Object cachedSize){                     Object cachedSize){
         if (dbg) pa("renderBuoyCell:"+node);  
   
86          int[] pan = getCoords(node);          int[] pan = getCoords(node);
87            float [] bs = new float[2];
88            nodeview.getSize(node, bs);
89            pan[0] += bs[0]/2;
90            pan[1] += bs[1]/2;
91    
92            if (GraphicsAPI.getInstance() instanceof GLAPI) {
93                final int c2fCS =
94                    vs.coords.ortho(0, 0,  -pan[0]*buoyZoom, -pan[1]*buoyZoom, buoyZoom, buoyZoom);
95                final int c2fCSInv =
96                    vs.coords.ortho(0, 0,  pan[0], pan[1], 1/buoyZoom, 1/buoyZoom);
97                vs.matcher.add(into, c2fCS, "C2F");
98                vs.matcher.add(into, c2fCSInv, "C2FINV");
99    
100                //SinglePaper.i(space, d,win,c).render(vs, into, c2fCS, c2fCSInv, null);
101                /*
102                int c2fCS = vs.orthoCS(into, "C2F",0,0,0, 10,10);
103                int c2fCSInv = vs.orthoCS(into, "C2FINV",0,0,0, 10,10);
104                
105                setZoomPan(vs, into);
106                // XXX SinglePaper.i(space, d, window, current).render(vs, into, c2fCS, c2fCSInv, hook);
107                */
108            } else {
109                int zo = (int)(buoyZoom * 100000);
110                int geometry = vs.orthoCS(0, "FocusGeometry",0, zo,0, pan[0], pan[1]);  
111                
112                vs.map.put(new UniquePaperVob(URN5Namespace.instance.generateId()), into, geometry);
113                (new SpatialPlane(PP.noteType, PP.contains)).renderAWT(vs, into, geometry,
114                                                                       node, nodeview, space.getModel(),null);
115            }
116    
         SimpleVStreamTexter sct = (SimpleVStreamTexter)space.getNodeTexter();  
         Enfilade1DImpl enf = (Enfilade1DImpl)sct.getEnfilade(node, null);  
         java.util.List enfList= enf.getList();  
         Span1D span = (Span1D) enfList.get(0);  
   
         float [] bs = new float[3];  
   
         //cv.getSize(c, ((ViewContext)new AbstractViewContext()), bs);  
   
         //pan[0] += bs[0]/2;  
         //pan[1] += bs[1]/2;  
         pan[0] += 200/2;  
         pan[1] += 200/2;  
   
   
         final int c2fCS =  
             vs.coords.ortho(0, 0,  -pan[0]*buoyZoom, -pan[1]*buoyZoom, buoyZoom, buoyZoom);  
         final int c2fCSInv =  
             vs.coords.ortho(0, 0,  pan[0], pan[1], 1/buoyZoom, 1/buoyZoom);  
         vs.matcher.add(into, c2fCS, "C2F");  
         vs.matcher.add(into, c2fCSInv, "C2FINV");  
   
         //SinglePaper.i(space, d,win,c).render(vs, into, c2fCS, c2fCSInv, null);  
117          return into;          return into;
118      }      }
119    

Legend:
Removed from v.1.5  
changed lines
  Added in v.1.6

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