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

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

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

revision 1.8 by mudyc, Wed Jul 30 15:46:45 2003 UTC revision 1.9 by tjl, Sat Aug 16 10:29:40 2003 UTC
# Line 57  public class NodeType2DFull extends Abst Line 57  public class NodeType2DFull extends Abst
57    
58      float [] tmpSize = new float[2];      float [] tmpSize = new float[2];
59      float [] tmpSqSize = new float[2];      float [] tmpSqSize = new float[2];
60      public int renderBuoy(VobScene vs, int into, Object linkId,      public int renderBuoy(VobScene vs, int into, float w, float h, Object linkId,
61                            Object anchor, Object cachedSize) {                            Object anchor, Object cachedSize) {
62          if (dbg) pa("renderBuoy");          if (dbg) pa("renderBuoy");
63          if(effigy != 0) {          if(effigy != 0) {
# Line 68  public class NodeType2DFull extends Abst Line 68  public class NodeType2DFull extends Abst
68          View2D.Anchor a = (View2D.Anchor)anchor;          View2D.Anchor a = (View2D.Anchor)anchor;
69    
70          view2d.getSize(a.plane, tmpSize);          view2d.getSize(a.plane, tmpSize);
         vs.coords.getSqSize(into, tmpSqSize);  
71    
72                    
73          float scale1 = tmpSize[0] / tmpSqSize[0];          float scale1 = tmpSize[0] / w;
74          float scale2 = tmpSize[1] / tmpSqSize[1];          float scale2 = tmpSize[1] / h;
75          float scale = (scale1 < scale2 ? scale1 : scale2);          float scale = (scale1 < scale2 ? scale1 : scale2);
76    
77          int box2paper = vs.coords.orthoBox(0, 0, 0, 0,          int box2paper = vs.coords.orthoBox(0, 0, 0, 0,
78                                             scale, scale,                                             scale, scale,
79                                             tmpSqSize[0], tmpSqSize[1]);                                             w, h);
80          vs.matcher.add(into, box2paper, "BOX2PAPER");          vs.matcher.add(into, box2paper, "BOX2PAPER");
81    
82          view2d.render(vs, a.plane, into, into, box2paper);          view2d.render(vs, a.plane, into, into, box2paper);

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