[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[ff-cvs] libvob org/nongnu/libvob/view/FisheyeState.java...
From: |
Tuomas J. Lukka |
Subject: |
[ff-cvs] libvob org/nongnu/libvob/view/FisheyeState.java... |
Date: |
Mon, 18 Aug 2003 16:06:31 -0400 |
CVSROOT: /cvsroot/libvob
Module name: libvob
Branch:
Changes by: Tuomas J. Lukka <address@hidden> 03/08/18 16:06:30
Modified files:
org/nongnu/libvob/view: FisheyeState.java
vob/demo/mouse : drags.py
Log message:
twids
CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/libvob/libvob/org/nongnu/libvob/view/FisheyeState.java.diff?tr1=1.9&tr2=1.10&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/libvob/libvob/vob/demo/mouse/drags.py.diff?tr1=1.4&tr2=1.5&r1=text&r2=text
Patches:
Index: libvob/org/nongnu/libvob/view/FisheyeState.java
diff -u libvob/org/nongnu/libvob/view/FisheyeState.java:1.9
libvob/org/nongnu/libvob/view/FisheyeState.java:1.10
--- libvob/org/nongnu/libvob/view/FisheyeState.java:1.9 Sat Aug 2 03:47:04 2003
+++ libvob/org/nongnu/libvob/view/FisheyeState.java Mon Aug 18 16:06:30 2003
@@ -36,7 +36,7 @@
* Uses clicks and drags by mouse button 3.
*/
public class FisheyeState {
-public static final String rcsid = "$Id: FisheyeState.java,v 1.9 2003/08/02
07:47:04 tjl Exp $";
+public static final String rcsid = "$Id: FisheyeState.java,v 1.10 2003/08/18
20:06:30 tjl Exp $";
public static boolean dbg = false;
private static void pa(String s) { System.out.println("FisheyeState::
"+s); }
@@ -142,7 +142,7 @@
curMouseX = e.getX();
curMouseY = e.getY();
- curmag *= Math.exp(.005 * -dy);
+ curmag *= Math.exp(.005 * dy);
cursize *= Math.exp(.005 * dx);
if(curmag < minmag) curmag = minmag;
@@ -174,7 +174,7 @@
curMouseX = e.getX();
curMouseY = e.getY();
- curmag *= Math.exp(.005 * -dy);
+ curmag *= Math.exp(.005 * dy);
cursize *= Math.exp(.005 * dx);
if(curmag < minmag) curmag = minmag;
Index: libvob/vob/demo/mouse/drags.py
diff -u libvob/vob/demo/mouse/drags.py:1.4 libvob/vob/demo/mouse/drags.py:1.5
--- libvob/vob/demo/mouse/drags.py:1.4 Sat Aug 9 10:39:45 2003
+++ libvob/vob/demo/mouse/drags.py Mon Aug 18 16:06:30 2003
@@ -63,7 +63,15 @@
def endDrag(self, x, y):
pass
-
+class MoveBlueTo(vob.mouse.MouseClickListener):
+ def __init__(self, scene):
+ self.scene = scene
+ def clicked(self, x, y):
+ self.scene.places[0] = (
+ x, y, self.scene.places[0][2], self.scene.places[0][3])
+ # Note how we don't call update() here: we *don't* want
+ # to set the new coordinates.
+ vob.AbstractUpdateManager.chg()
class QuadSelect(vob.mouse.MousePressListener):
def __init__(self, scene, drags):
@@ -96,6 +104,10 @@
"0": MoveSize(self, self.places, 0),
"1": MoveSize(self, self.places, 1),
}))
+
+ self.multiplexer.setListener(
+ 1, 0, "Click and move box", MoveBlueTo(self)
+ )
def mouse(self, ev):
print ev
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [ff-cvs] libvob org/nongnu/libvob/view/FisheyeState.java...,
Tuomas J. Lukka <=