[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gzz-commits] fenfire/org/fenfire/modules/pp Pp.java
From: |
Matti Katila |
Subject: |
[Gzz-commits] fenfire/org/fenfire/modules/pp Pp.java |
Date: |
Thu, 17 Apr 2003 06:22:05 -0400 |
CVSROOT: /cvsroot/fenfire
Module name: fenfire
Changes by: Matti Katila <address@hidden> 03/04/17 06:22:05
Modified files:
org/fenfire/modules/pp: Pp.java
Log message:
draw buoys after linking. workaround for stencil clipping.
CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/fenfire/fenfire/org/fenfire/modules/pp/Pp.java.diff?tr1=1.26&tr2=1.27&r1=text&r2=text
Patches:
Index: fenfire/org/fenfire/modules/pp/Pp.java
diff -u fenfire/org/fenfire/modules/pp/Pp.java:1.26
fenfire/org/fenfire/modules/pp/Pp.java:1.27
--- fenfire/org/fenfire/modules/pp/Pp.java:1.26 Wed Apr 16 04:45:58 2003
+++ fenfire/org/fenfire/modules/pp/Pp.java Thu Apr 17 06:22:05 2003
@@ -28,7 +28,7 @@
public class Pp implements BuoyLinkListener {
-public static final String rcsid = "$Id: Pp.java,v 1.26 2003/04/16 08:45:58
mudyc Exp $";
+public static final String rcsid = "$Id: Pp.java,v 1.27 2003/04/17 10:22:05
mudyc Exp $";
public static final boolean dbg = false;
protected static void p(String s) { if(dbg) pa(s); }
protected static void pa(String s) { System.out.println("Pp::"+s); }
@@ -207,6 +207,7 @@
private void render(VobScene vs) {
buoys.clear();
curVs = vs;
+ realLinks = new ArrayList();
vs.map.put(new SolidBackdropVob(Color.lightGray));
float width = (float)vs.size.getWidth() * focusSizeFactor;
@@ -215,28 +216,47 @@
ctrX = ((float)vs.size.width)/2;
ctrY = ((float)vs.size.height)/2;
+ /*
int focusCtr = vs.translateCS(0, "FocusCtr", ctrX,ctrY);
int frameCS = vs.orthoBoxCS(focusCtr, "FocusFrame", 200,
-width/2, -height/2, 1, 1,
width, height);
-
- //int frameCS = vs.orthoBoxCS(0, "FocusFrame", 200,
- // ctrX - width/2, ctrY - height/2, 1, 1,
- // width, height);
+ */
+ int frameCS = vs.orthoBoxCS(0, "FocusFrame", 200,
+ ctrX - width/2, ctrY - height/2, 1, 1,
+ width, height);
vs.activate(frameCS);
if (focus == null)
focus = adaptor.createMainNode(null, accursed, this);
focus.renderMain(vs, frameCS);
+
+ // render links!
+ for (int i=0; i<realLinks.size(); i++) {
+ Object[] args = (Object[])realLinks.get(i);
+ int dir = ((Integer)args[0]).intValue();
+ int anchorCS = ((Integer)args[1]).intValue();
+ linkReally(dir, anchorCS, (BuoyViewNodeType)args[2], args[3],
args[4]);
+ }
}
// ------------------------------------------------------------
// BuoyLinkListener
+ ArrayList realLinks = new ArrayList();
public void link(int dir, int anchorCS, BuoyViewNodeType otherNode,
Object linkId, Object otherAnchor) {
p("link!");
+ realLinks.add(new Object[] { new Integer(dir), new Integer(anchorCS),
+ otherNode, linkId, otherAnchor });
+ }
+ /** Because of gl clipping with stencil buoy nodes
+ * must be rendered after the linking.
+ */
+ private void linkReally(int dir, int anchorCS, BuoyViewNodeType otherNode,
+ Object linkId, Object otherAnchor) {
+ p("linkReally!");
int anchorUnit = curVs.unitSqCS(anchorCS, "UN");
int anchorCenter = curVs.translateCS(anchorUnit, "TR55", 0.5f, 0.5f);
float r = ctrY * 0.9f;