/[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.8 by mudyc, Wed Apr 30 01:00:00 2003 UTC revision 1.9 by mudyc, Sat May 3 00:57:00 2003 UTC
# Line 40  import java.awt.event.MouseEvent; Line 40  import java.awt.event.MouseEvent;
40   */   */
41  public class NodeType2D extends AbstractNodeType2D {  public class NodeType2D extends AbstractNodeType2D {
42      public static boolean dbg = false;      public static boolean dbg = false;
43      private static void pa(String s) { System.out.println(s); }      private static void pa(String s) { System.out.println("NodeType2D:: "+s); }
44    
45      public static int effigy = 0;      public static int effigy = 0;
46            
# Line 60  public class NodeType2D extends Abstract Line 60  public class NodeType2D extends Abstract
60    
61      public int renderBuoy(VobScene vs, int into, Object linkId,      public int renderBuoy(VobScene vs, int into, Object linkId,
62                            Object anchor, Object cachedSize) {                            Object anchor, Object cachedSize) {
63            if (dbg) pa("start renderBuoy");
64          if(effigy != 0) {          if(effigy != 0) {
65              Vob eff = org.nongnu.libvob.gl.GLRen.createQuad(effigy-1, 0,0);              Vob eff = org.nongnu.libvob.gl.GLRen.createQuad(effigy-1, 0,0);
66              vs.map.put( eff, into);              vs.map.put( eff, into);
# Line 72  public class NodeType2D extends Abstract Line 73  public class NodeType2D extends Abstract
73          float[] tmp = new float[2];          float[] tmp = new float[2];
74          vs.coords.getSqSize(into, tmp);          vs.coords.getSqSize(into, tmp);
75          float w = tmp[0], h = tmp[1];          float w = tmp[0], h = tmp[1];
76          pa("rect "+rect+" coords "+w+","+h);          if (dbg) pa("rect "+rect+" coords "+w+","+h);
77    
78          float scale = w / rect.width;          float scale = w / rect.width;
79          if(scale < h / rect.height) scale = h / rect.height;          if(scale < h / rect.height) scale = h / rect.height;
# Line 87  public class NodeType2D extends Abstract Line 88  public class NodeType2D extends Abstract
88    
89          view2d.render(vs, plane, into, into, box2paper);          view2d.render(vs, plane, into, into, box2paper);
90    
91            if (dbg) pa("start renderBuoy..DONE");
92          return vs.coords.translate(into, w/2f, h/2f);          return vs.coords.translate(into, w/2f, h/2f);
93      }      }
94  }  }

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