[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gzz-commits] gzz/gzz/modules/pp2 PPCanvasNode.java
From: |
Matti Katila |
Subject: |
[Gzz-commits] gzz/gzz/modules/pp2 PPCanvasNode.java |
Date: |
Wed, 05 Feb 2003 10:02:39 -0500 |
CVSROOT: /cvsroot/gzz
Module name: gzz
Changes by: Matti Katila <address@hidden> 03/02/05 10:02:39
Modified files:
gzz/modules/pp2: PPCanvasNode.java
Log message:
buoyrender
CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/gzz/gzz/modules/pp2/PPCanvasNode.java.diff?tr1=1.3&tr2=1.4&r1=text&r2=text
Patches:
Index: gzz/gzz/modules/pp2/PPCanvasNode.java
diff -u gzz/gzz/modules/pp2/PPCanvasNode.java:1.3
gzz/gzz/modules/pp2/PPCanvasNode.java:1.4
--- gzz/gzz/modules/pp2/PPCanvasNode.java:1.3 Tue Feb 4 21:27:20 2003
+++ gzz/gzz/modules/pp2/PPCanvasNode.java Wed Feb 5 10:02:38 2003
@@ -33,9 +33,9 @@
/** XXX
*/
public class PPCanvasNode implements CellBuoyViewNodeType {
- private static final String rcsid = "$Id: PPCanvasNode.java,v 1.3
2003/02/05 02:27:20 mudyc Exp $";
+private static final String rcsid = "$Id: PPCanvasNode.java,v 1.4 2003/02/05
15:02:38 mudyc Exp $";
public static boolean dbg = false;
- private static void pa(String s) { System.err.println(s); }
+ private static void pa(String s) { System.out.println("PPCanvasNode:"+s); }
private PPDims d;
private AbstractViewContext avc;
@@ -49,6 +49,17 @@
}
+ /** The zoom to be used for the buoys.
+ */
+ public float buoyZoom = 1;
+
+ /** The zoom to be used for the link creation buoys.
+ */
+ public float linkbuoyZoom = .5f;
+
+
+
+
public boolean ownsCell(Cell c) {
// XXX
// how can I check that this is PP cell?
@@ -59,12 +70,26 @@
}
public void renderBuoy(VobScene vs, int into, Cell c, Object content) {
-
+ pa("Tee poiju!!!");
+
+ vs.activate(into);
+ // XXX Pan
+ int[] pan = getCoords(c);
+ final int c2fCS =
+ vs.coords.ortho(0, 0, -pan[0]*buoyZoom, -pan[1]*buoyZoom,
buoyZoom, buoyZoom);
+ vs.matcher.add(into, c2fCS, "C2F");
+
+ SinglePaper.i(avc,d,win).render(vs, into, c2fCS);
}
public BuoyViewMainNode createMainNode(Cell c, Object content,
CellPlacementHook hook) {
return new PPCanvasCursor(c, avc, d, win);
}
+ private int[] getCoords(Cell c) {
+ Cell firstCoord = c.s(d.pan);
+ if(firstCoord == null) return null;
+ return gzz.client.Params.getInts(firstCoord, d.pan, 2, null);
+ }
}
- [Gzz-commits] gzz/gzz/modules/pp2 PPCanvasNode.java,
Matti Katila <=