/[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.13 by tjl, Tue May 13 03:14:24 2003 UTC revision 1.14 by tjl, Tue May 13 11:48:32 2003 UTC
# Line 17  import org.nongnu.alph.*; Line 17  import org.nongnu.alph.*;
17    
18  import java.util.Iterator;  import java.util.Iterator;
19    
20  /** A View2D on a PP-like canvas.  /** A View2D of a CANVAS2D, with a given node function.
21   */   */
22  public class CanvasView2D extends View2D {  public class CanvasView2D extends View2D implements NodedView2D{
23  public static final String rcsid = "$Id$";  public static final String rcsid = "$Id$";
24      public static boolean dbg = false;      public static boolean dbg = false;
25      private static void pa(String s) { System.out.println("CanvasView2D::"+s); }      private static void pa(String s) { System.out.println("CanvasView2D::"+s); }
# Line 64  public static final String rcsid = "$Id$ Line 64  public static final String rcsid = "$Id$
64                                  x, y, 1, 1,                                  x, y, 1, 1,
65                              p.getWidth(), p.getHeight());                              p.getWidth(), p.getHeight());
66              vs.matcher.add(matchingParent, cs, matchKey);              vs.matcher.add(matchingParent, cs, matchKey);
67                vs.activate(cs);
68              if(cull) {              if(cull) {
69                  cs = vs.cullCS(cs, "CULL", box2screen);                  cs = vs.cullCS(cs, "CULL", box2screen);
70              }              }
# Line 71  public static final String rcsid = "$Id$ Line 72  public static final String rcsid = "$Id$
72          }          }
73          if (dbg) pa("Canvas DONE");          if (dbg) pa("Canvas DONE");
74      }      }
75    
76        public Object getNode(VobScene oldvs,
77                        int x, int y,
78                        Object plane, int matchingParent,
79                        int box2screen, int box2plane,
80                        float[] xyout) {
81            int cs = oldvs.getCSAt(box2screen, x, y, xyout);
82            if(cs <= 1) return null;
83            Pair p = (Pair)oldvs.matcher.getKey(cs);
84            return p.second;
85        }
86  }  }

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