/[fenfire]/fenfire/org/fenfire/view/buoy/NodeType2D.java
ViewVC logotype

Diff of /fenfire/org/fenfire/view/buoy/NodeType2D.java

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

revision 1.10 by benja, Wed Jun 11 16:10:04 2003 UTC revision 1.11 by benja, Fri Jun 27 22:18:41 2003 UTC
# Line 26  NodeType2D.java Line 26  NodeType2D.java
26   */   */
27  package org.fenfire.view.buoy;  package org.fenfire.view.buoy;
28  import org.fenfire.view.View2D;  import org.fenfire.view.View2D;
29    import org.fenfire.view.NodedView2D;
30  import org.fenfire.util.Pair;  import org.fenfire.util.Pair;
31  import org.nongnu.libvob.*;  import org.nongnu.libvob.*;
32  import org.nongnu.libvob.impl.DefaultVobMatcher;  import org.nongnu.libvob.impl.DefaultVobMatcher;
# Line 52  public class NodeType2D extends Abstract Line 53  public class NodeType2D extends Abstract
53      public Object getSize(Object linkId, Object anchor,      public Object getSize(Object linkId, Object anchor,
54                            float wh[]) {                            float wh[]) {
55          Pair p = (Pair)anchor;          Pair p = (Pair)anchor;
56          Rectangle rect = (Rectangle)p.second;          Pair q = (Pair)p.second;
57            Rectangle rect = (Rectangle)q.first;
58          wh[0] = rect.width;          wh[0] = rect.width;
59          wh[1] = rect.height;          wh[1] = rect.height;
60          return null;          return null;
# Line 68  public class NodeType2D extends Abstract Line 70  public class NodeType2D extends Abstract
70          }          }
71          Pair p = (Pair)anchor;          Pair p = (Pair)anchor;
72          Object plane = p.first;          Object plane = p.first;
         Rectangle rect = (Rectangle)p.second;  
73    
74            Pair q = (Pair)p.second;
75            Rectangle rect = (Rectangle)q.first;
76            Object node = q.second; // may be null if this
77                                    // is not a noded View2D
78            
79          float[] tmp = new float[2];          float[] tmp = new float[2];
80          vs.coords.getSqSize(into, tmp);          vs.coords.getSqSize(into, tmp);
81          float w = tmp[0], h = tmp[1];          float w = tmp[0], h = tmp[1];
# Line 89  public class NodeType2D extends Abstract Line 95  public class NodeType2D extends Abstract
95          view2d.render(vs, plane, into, into, box2paper);          view2d.render(vs, plane, into, into, box2paper);
96    
97          if (dbg) pa("start renderBuoy..DONE");          if (dbg) pa("start renderBuoy..DONE");
98          return vs.coords.unitSq(into);          
99            int box = node==null ? into : vs.matcher.getCS(into, new Pair(plane, node));
100            return vs.coords.unitSq(box);
101      }      }
102  }  }

Legend:
Removed from v.1.10  
changed lines
  Added in v.1.11

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