[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gzz-commits] gzz/gzz/modules/pp ImageCell.java PPView2.java ...
From: |
Matti Katila |
Subject: |
[Gzz-commits] gzz/gzz/modules/pp ImageCell.java PPView2.java ... |
Date: |
Fri, 10 Jan 2003 12:14:57 -0500 |
CVSROOT: /cvsroot/gzz
Module name: gzz
Changes by: Matti Katila <address@hidden> 03/01/10 12:14:57
Modified files:
gzz/modules/pp : ImageCell.java PPView2.java demotest.py
Log message:
fix algorithm
CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/gzz/gzz/modules/pp/ImageCell.java.diff?tr1=1.7&tr2=1.8&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/gzz/gzz/modules/pp/PPView2.java.diff?tr1=1.53&tr2=1.54&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/gzz/gzz/modules/pp/demotest.py.diff?tr1=1.60&tr2=1.61&r1=text&r2=text
Patches:
Index: gzz/gzz/modules/pp/ImageCell.java
diff -u gzz/gzz/modules/pp/ImageCell.java:1.7
gzz/gzz/modules/pp/ImageCell.java:1.8
--- gzz/gzz/modules/pp/ImageCell.java:1.7 Fri Jan 10 08:10:58 2003
+++ gzz/gzz/modules/pp/ImageCell.java Fri Jan 10 12:14:57 2003
@@ -71,6 +71,7 @@
return im;
}
+ public boolean showAll = true;
public void setAccursedCell(Cell c) { accursed = c; }
private Cell accursed;
@@ -87,7 +88,7 @@
if (c == accursed)
((LinebrokenCellContentView)def).place(c, vs, box, context,
"Color 0.6 0 0");
else
- def.place(c, vs, box, context);
+ if (showAll) def.place(c, vs, box, context);
return;
}
Index: gzz/gzz/modules/pp/PPView2.java
diff -u gzz/gzz/modules/pp/PPView2.java:1.53
gzz/gzz/modules/pp/PPView2.java:1.54
--- gzz/gzz/modules/pp/PPView2.java:1.53 Fri Jan 10 11:34:19 2003
+++ gzz/gzz/modules/pp/PPView2.java Fri Jan 10 12:14:57 2003
@@ -36,7 +36,7 @@
import java.util.*;
public class PPView2 implements View {
-public static final String rcsid = "$Id: PPView2.java,v 1.53 2003/01/10
16:34:19 mudyc Exp $";
+public static final String rcsid = "$Id: PPView2.java,v 1.54 2003/01/10
17:14:57 mudyc Exp $";
public static boolean dbg = true;
private static void pa(String s) { System.err.println(s); }
@@ -298,10 +298,17 @@
// 1-N kludge
pa("count: "+count+", even? "+ count %2);
- if (count %2 == 0) {
- count--;
- } else count *= -1;
- actr = vs.translateCS(actr, "SHIFT_"+count, 0, count * 1.4f);
+ if (count > 0) {
+ // evens 2,4,6 -> 1,2,3,4,..
+ // odds 1,3,5,7 -> -1,-2,-3,-4
+ if (count %2 == 1) {
+ count++;
+ count *= -1;
+ count *= 0.5;
+ } else count *= 0.5;
+ }
+ pa("count ->"+count);
+ actr = vs.translateCS(actr, "SHIFT_"+count, 0, count * 1.6f);
int buoycs = floater.buoyCoordsys(actr, key);
Index: gzz/gzz/modules/pp/demotest.py
diff -u gzz/gzz/modules/pp/demotest.py:1.60 gzz/gzz/modules/pp/demotest.py:1.61
--- gzz/gzz/modules/pp/demotest.py:1.60 Fri Jan 10 11:11:29 2003
+++ gzz/gzz/modules/pp/demotest.py Fri Jan 10 12:14:57 2003
@@ -190,12 +190,13 @@
or key == "Home" or key == "End" \
or key == "Ctrl-HomE" or key == "Ctrl-EnD":
- self.ppv.viewMode = self.ppv.TEXT_EDITING
- self.ppv.showLinkbuoys = 0
-
c = self.avc.getAccursed()
if self.avc.getCursorOffset(c) < 0 or c.s(self.d.contains, -1) ==
None:
return
+
+ self.ppv.viewMode = self.ppv.TEXT_EDITING
+ self.ppv.showLinkbuoys = 0
+
offs = self.avc.getCursorOffset(c)
print "OFss:", offs