/[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.1 by benja, Fri Apr 25 13:57:08 2003 UTC revision 1.2 by tjl, Fri Apr 25 14:43:04 2003 UTC
# Line 64  public class NodeType2D implements BuoyV Line 64  public class NodeType2D implements BuoyV
64          Object plane = p.first;          Object plane = p.first;
65          Rectangle rect = (Rectangle)p.second;          Rectangle rect = (Rectangle)p.second;
66    
         /**  
67          float[] tmp = new float[2];          float[] tmp = new float[2];
68          vs.coords.getSqSize(into, tmp);          vs.coords.getSqSize(into, tmp);
69          float w = tmp[0], h = tmp[1];          float w = tmp[0], h = tmp[1];
70          pa("rect "+rect+" coords "+w+","+h);          pa("rect "+rect+" coords "+w+","+h);
71          **/  
72            float scale = w / rect.width;
73            if(scale < h / rect.height) scale = h / rect.height;
74    
75          int box2paper = vs.coords.orthoBox(0, 0, rect.x, rect.y,          int box2paper = vs.coords.orthoBox(0, 0, rect.x, rect.y,
76                                             1, 1, rect.width, rect.height);                                             scale, scale,
77                                               w, h);
78            vs.matcher.add(into, box2paper, "BUOYPAP");
79    
80          view.render(vs, plane, into, into, box2paper);          view.render(vs, plane, into, into, box2paper);
81          return vs.coords.translate(into, rect.width/2f, rect.height/2f);          return vs.coords.translate(into, w/2f, h/2f);
82      }      }
83    
84      public BuoyViewMainNode createMainNode(Object linkId,      public BuoyViewMainNode createMainNode(Object linkId,

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.2

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