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

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

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

revision 1.8 by mudyc, Mon Jul 7 06:00:52 2003 UTC revision 1.9 by mudyc, Thu Jul 17 16:28:19 2003 UTC
# Line 4  package org.fenfire.view; Line 4  package org.fenfire.view;
4  import org.fenfire.view.lava.*;  import org.fenfire.view.lava.*;
5  import org.nongnu.libvob.*;  import org.nongnu.libvob.*;
6  import org.nongnu.libvob.gl.*;  import org.nongnu.libvob.gl.*;
7    import org.fenfire.util.lava.*;
8    
9    import java.util.*;
10    
11  /** View2D to draw the selecting area  /** View2D to draw the selecting area
12   */   */
# Line 41  public class AreaSelectingView2D extends Line 44  public class AreaSelectingView2D extends
44          pq = GLRen.createFixedPaperQuad(paper, 0, 0, 1, 1, 0, 10, 10, 10);          pq = GLRen.createFixedPaperQuad(paper, 0, 0, 1, 1, 0, 10, 10, 10);
45      }      }
46    
47      int cs = -1;  
48        private CoordsysCache coords = new CoordsysCache();
49    
50      public void render(VobScene vs, Object plane,      public void render(VobScene vs, Object plane,
51                         int matchingParent,                         int matchingParent,
# Line 51  public class AreaSelectingView2D extends Line 55  public class AreaSelectingView2D extends
55              child.render(vs, plane, matchingParent,              child.render(vs, plane, matchingParent,
56                           box2screen, box2paper);                           box2screen, box2paper);
57    
         if (current != plane) return;  
58    
59          int paper2box = vs.invertCS(box2paper, "areaselectview_INv");          int paper2box = vs.invertCS(box2paper, "areaselectview_INv");
60          int paper2screen = vs.concatCS(box2screen, "areaselectview_conc",          int paper2screen = vs.concatCS(box2screen, "areaselectview_conc",
61                                     paper2box);                                     paper2box);
62          cs = vs.orthoCS(paper2screen, "selection", 0, 1,2,3,4);          int cs = vs.orthoCS(paper2screen, "selection", 0, 1,2,3,4);
63          chgFast(vs);          Object key = vs.matcher.getKey(box2screen);
64          vs.put(pq, cs);          if (dbg) p("key b2s: "+vs.matcher.getKey(box2screen));
65            coords.set(key, cs);
66            chgFast(vs, key);
67    
68            if (current != plane) return;
69            if (dbg) p("ok, draw the selection!"+x0+","+y0+","+x1+","+y1);
70            vs.put(pq, cs);
71      }      }
72    
73      public void chgFast(VobScene oldVS) {      public void chgFast(VobScene oldVS, Object key) {
74          oldVS.coords.setOrthoParams(cs, 0,  x0,y0,x1-x0,y1-y0);          if (dbg) p("key Fast: "+key);
75            oldVS.coords.setOrthoParams(coords.get(key), 0,  x0,y0,x1-x0,y1-y0);
76      }      }
77                    
78                    

Legend:
Removed from v.1.8  
changed lines
  Added in v.1.9

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