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

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

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

revision 1.5 by mudyc, Tue Apr 8 14:56:52 2003 UTC revision 1.6 by mudyc, Tue Apr 8 20:05:03 2003 UTC
# Line 48  public static final String rcsid = "$Id$ Line 48  public static final String rcsid = "$Id$
48      public int getCursorBox() { return cursorBox; }      public int getCursorBox() { return cursorBox; }
49    
50    
   
51      public void renderAWT(VobScene vs, int into, int geom,      public void renderAWT(VobScene vs, int into, int geom,
52                            RDFNode node, NodeView nodeview,                            RDFNode node, NodeView nodeview,
53                            Model model, NodePlacementHook hook)                            Model model, NodePlacementHook hook)
# Line 60  public static final String rcsid = "$Id$ Line 59  public static final String rcsid = "$Id$
59              container = ShortRDF.getSubj(model, current, cont);              container = ShortRDF.getSubj(model, current, cont);
60          }          }
61    
   
62          // get zoom geometry etc.          // get zoom geometry etc.
63          float[] size = new float[2];          float[] size = new float[2];
64          vs.coords.getSqSize(into, size);          vs.coords.getSqSize(into, size);
# Line 69  public static final String rcsid = "$Id$ Line 67  public static final String rcsid = "$Id$
67          pt[1] += size[1]/2;          pt[1] += size[1]/2;
68                    
69    
70          float[] pan = new float[2];          float[] pan = new float[]{1,1};
71          vs.coords.getSqSize(geom, pan);          vs.coords.getSqSize(geom, pan);
72          float zoom = (vs.coords.transformPoints3(geom, new float[3], null))[0]/100000;          float zoom = (vs.coords.transformPoints3(geom, new float[3], null))[0]/100000;
73    
74            pa("pan x/y: " +pan[0]+ "/"+pan[1]);
75    
76          float[] bs = new float[2];          float[] bs = new float[2];
77          cursorBox = -1;          cursorBox = -1;
78                    
# Line 88  public static final String rcsid = "$Id$ Line 88  public static final String rcsid = "$Id$
88              coords[0] = ShortRDF.getInt(model, n, SPATIAL.coordX);              coords[0] = ShortRDF.getInt(model, n, SPATIAL.coordX);
89              coords[1] = ShortRDF.getInt(model, n, SPATIAL.coordY);              coords[1] = ShortRDF.getInt(model, n, SPATIAL.coordY);
90    
             // get size XXX  
               
91              nodeview.getSize(n, bs, zoom);              nodeview.getSize(n, bs, zoom);
92              Pair matchKey = new Pair(container, n);              Pair matchKey = new Pair(container, n);
93              int box = vs.orthoCS(0, matchKey, 50,              int box = vs.orthoCS(0, matchKey, 50,
# Line 97  public static final String rcsid = "$Id$ Line 95  public static final String rcsid = "$Id$
95                                   pt[1] + (pan[1] + coords[1]) * zoom,                                   pt[1] + (pan[1] + coords[1]) * zoom,
96                                   bs[0], bs[1]);                                   bs[0], bs[1]);
97              nodeview.place(n, vs, box);              nodeview.place(n, vs, box);
             hook.placed(n, vs, box);  
             //vs.put(new org.nongnu.libvob.vobs.RectBgVob(java.awt.Color.red), box);  
         }  
   
             /*  
               from nodeview nv.getSize(note, bs)  
98                            
99              */              if (hook != null) hook.placed(n, vs, box);
100    
101          /*              // XXX?
102              if (vs.coords instanceof GLVobCoorder && cullCS > 0) {              //vs.activate(box);
                 int cull = ((GLVobCoorder)vs.coords).cull(box, cullCS);  
                 vs.matcher.add(box, cull, matchKey+"cull");  
                 box = cull;  
             }  
   
             // XXX cv.place(item, vs, box, context);  
             vs.activate(box);  
   
             // XXX  
             //  if(item.equals(cur))  
             //  cursorBox = box;  
103    
104                if(current.equals(n))
105                    cursorBox = box;
106          }          }
         */  
107      } catch (RDFException e) {      } catch (RDFException e) {
108          pa("Exception ocurred!: "+e);          pa("Exception ocurred!: "+e);
109          throw new Error("PPLinker error: Failed to doLink!!");          throw new Error("PPLinker error: Failed to doLink!!");

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