[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gzz-commits] fenfire/org/fenfire/view/buoy NodeType2D.java
From: |
Tuomas J. Lukka |
Subject: |
[Gzz-commits] fenfire/org/fenfire/view/buoy NodeType2D.java |
Date: |
Wed, 30 Jul 2003 08:52:33 -0400 |
CVSROOT: /cvsroot/fenfire
Module name: fenfire
Branch:
Changes by: Tuomas J. Lukka <address@hidden> 03/07/30 08:52:33
Modified files:
org/fenfire/view/buoy: NodeType2D.java
Log message:
Fix next crash - some to go but will bbl
CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/fenfire/fenfire/org/fenfire/view/buoy/NodeType2D.java.diff?tr1=1.13&tr2=1.14&r1=text&r2=text
Patches:
Index: fenfire/org/fenfire/view/buoy/NodeType2D.java
diff -u fenfire/org/fenfire/view/buoy/NodeType2D.java:1.13
fenfire/org/fenfire/view/buoy/NodeType2D.java:1.14
--- fenfire/org/fenfire/view/buoy/NodeType2D.java:1.13 Wed Jul 30 08:47:43 2003
+++ fenfire/org/fenfire/view/buoy/NodeType2D.java Wed Jul 30 08:52:33 2003
@@ -60,29 +60,24 @@
}
public int renderBuoy(VobScene vs, int into, Object linkId,
- Object anchor, Object cachedSize) {
+ Object a, Object cachedSize) {
if (dbg) pa("start renderBuoy");
if(effigy != 0) {
Vob eff = org.nongnu.libvob.gl.GLRen.createQuad(effigy-1, 0,0);
vs.map.put( eff, into);
return into;
}
- Triple t = (Triple)anchor;
- Object plane = t.first;
+ View2D.Anchor anchor = (View2D.Anchor)a;
- Rectangle rect = (Rectangle)t.second;
- Object node = t.third; // may be null if this
- // is not a noded View2D
-
float[] tmp = new float[2];
vs.coords.getSqSize(into, tmp);
float w = tmp[0], h = tmp[1];
- if (dbg) pa("rect "+rect+" coords "+w+","+h);
+ if (dbg) pa("rect "+anchor+" coords "+w+","+h);
- float scale = w / rect.width;
- if(scale < h / rect.height) scale = h / rect.height;
+ float scale = w / anchor.w;
+ if(scale < h / anchor.h) scale = h / anchor.h;
- int box2paper = vs.coords.orthoBox(0, 0, rect.x, rect.y,
+ int box2paper = vs.coords.orthoBox(0, 0, anchor.x, anchor.y,
1/scale, 1/scale,
w, h);
// int box2paper = vs.coords.orthoBox(0, 0, 0, 0,
@@ -90,11 +85,17 @@
// w, h);
vs.matcher.add(into, box2paper, "BOX2PAPER");
- view2d.render(vs, plane, into, into, box2paper);
+ view2d.render(vs, anchor.plane, into, into, box2paper);
if (dbg) pa("start renderBuoy..DONE");
+
+ // anchor.node may be null if this
+ // is not a noded View2D
- int box = node==null ? into : vs.matcher.getCS(into, new Pair(plane,
node));
+ int box = anchor.node==null
+ ? into
+ : vs.matcher.getCS(into,
+ new Pair(anchor.plane, anchor.node));
return vs.coords.unitSq(box);
}
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Gzz-commits] fenfire/org/fenfire/view/buoy NodeType2D.java,
Tuomas J. Lukka <=