/[fenfire]/fenfire/org/fenfire/view/CanvasView2D.java
ViewVC logotype

Diff of /fenfire/org/fenfire/view/CanvasView2D.java

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

revision 1.16 by mudyc, Fri May 23 14:26:08 2003 UTC revision 1.17 by benja, Tue Jun 10 13:02:53 2003 UTC
# Line 12  import org.nongnu.libvob.*; Line 12  import org.nongnu.libvob.*;
12  import org.nongnu.libvob.gl.*;  import org.nongnu.libvob.gl.*;
13  import org.nongnu.libvob.impl.gl.*;  import org.nongnu.libvob.impl.gl.*;
14  import org.nongnu.libvob.buoy.*;  import org.nongnu.libvob.buoy.*;
15    import org.nongnu.libvob.vobs.SimpleConnection;
16  import org.nongnu.libvob.lava.placeable.Placeable;  import org.nongnu.libvob.lava.placeable.Placeable;
17  import org.nongnu.alph.*;  import org.nongnu.alph.*;
18    
# Line 28  public static final String rcsid = "$Id$ Line 29  public static final String rcsid = "$Id$
29      private NodeFunction nodeView;      private NodeFunction nodeView;
30      public boolean cull;      public boolean cull;
31    
32        protected SimpleConnection lineconn = new SimpleConnection(.5f, .5f, .5f, .5f);
33    
34      public CanvasView2D(Fen fen, NodeFunction nodeView) {      public CanvasView2D(Fen fen, NodeFunction nodeView) {
35          this.fen = fen;          this.fen = fen;
36          this.nodeView = nodeView;          this.nodeView = nodeView;
37            lineconn.glsetup = GLCache.getCallList(
38                "PushAttrib ENABLE_BIT LINE_BIT\n"+
39                "Disable TEXTURE_2D\n"+
40                "LineWidth 5\n" +
41                "Enable BLEND\n" +
42                "Color 0 0 0 0.6\n"
43            );
44            lineconn.glteardown = GLCache.getCallList("PopAttrib");
45      }      }
46    
47      public void render(VobScene vs, Object container,      public void render(VobScene vs, Object container,
# Line 71  public static final String rcsid = "$Id$ Line 82  public static final String rcsid = "$Id$
82              p.place(vs, cs);              p.place(vs, cs);
83          }          }
84    
85            // show connections
86            Iterator iter1 = fen.constgraph.findN_11X_Iter(container,
87                                                          CANVAS2D.contains);
88            while (iter1.hasNext()) {
89                Object node1 = iter1.next();
90                Pair key1 = new Pair(container, node1);
91                int cs1 = vs.matcher.getCS(matchingParent, key1);
92    
93                Iterator iter2 = fen.constgraph.findN_11X_Iter(node1,
94                        STRUCTLINK.linkedTo);
95                while (iter2.hasNext()) {
96                    Object node2 = iter2.next();
97                    Object container2 = fen.constgraph.find1_X11(CANVAS2D.contains, node2);
98                    if(container2 != container)
99                        continue;
100                    Pair key2 = new Pair(container, node2);
101                    int cs2 = vs.matcher.getCS(matchingParent, key2);
102                    
103                    vs.map.put(lineconn, cs1, cs2);
104                }
105            }
106    
107          if (dbg) pa("Canvas DONE");          if (dbg) pa("Canvas DONE");
108      }      }
109    

Legend:
Removed from v.1.16  
changed lines
  Added in v.1.17

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