[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gzz-commits] fenfire/org/fenfire/demo buoyoing.py buoyoing1.py
From: |
Janne V. Kujala |
Subject: |
[Gzz-commits] fenfire/org/fenfire/demo buoyoing.py buoyoing1.py |
Date: |
Mon, 14 Jul 2003 11:16:12 -0400 |
CVSROOT: /cvsroot/fenfire
Module name: fenfire
Branch:
Changes by: Janne V. Kujala <address@hidden> 03/07/14 11:16:12
Modified files:
org/fenfire/demo: buoyoing.py
Removed files:
org/fenfire/demo: buoyoing1.py
Log message:
Ctrl-S to toggle single/double geometer
CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/fenfire/fenfire/org/fenfire/demo/buoyoing.py.diff?tr1=1.90&tr2=1.91&r1=text&r2=text
Patches:
Index: fenfire/org/fenfire/demo/buoyoing.py
diff -u fenfire/org/fenfire/demo/buoyoing.py:1.90
fenfire/org/fenfire/demo/buoyoing.py:1.91
--- fenfire/org/fenfire/demo/buoyoing.py:1.90 Mon Jul 14 10:08:40 2003
+++ fenfire/org/fenfire/demo/buoyoing.py Mon Jul 14 11:16:12 2003
@@ -364,12 +364,61 @@
return 1
+class SingleGeometer(DoubleGeometer):
+ def __init__(self, mgr, context, nodeview):
+ DoubleGeometer.__init__(self, mgr, context, nodeview)
+
+ def _doset(self, vs):
+ w,h = vs.size.width, vs.size.height
+
+ w0 = w*3/4
+ h0 = h - 40
+ s0 = 1
+
+ ctrx = w/2
+
+ buoywidth0 = w0 * 1.2
+ buoyheight0 = h0 * 1.2
+
+ if (dbg): pa("SET SINGLE ", h0, w0, s0, buoywidth0)
+
+ vs.coords.setOrthoBoxParams(self.into1, 1,
+ ctrx - .5*w0*s0,
+ 20,
+ s0, s0,
+ w0, h0)
+
+ vs.coords.setOrthoBoxParams(self.buoyinto1, 1,
+ ctrx - .5*buoywidth0, 0 + .5*h0 - .5*buoyheight0,
+ s0, s0,
+ buoywidth0/s0, buoyheight0/s0)
+
+ def place(self, vs):
+ self.height = vs.size.height
+ self.width = vs.size.width
+ self.into1 = vs.orthoBoxCS(0, "FocusFrame1", 0, 0, 0, 0, 0, 0, 0)
+ self.buoyinto1 = vs.orthoBoxCS(0, "BuoyFrame1", 0, 0, 0, 0, 0, 0, 0)
+
+ self._doset(vs)
+
+ return [(self.into1, self.buoyinto1)]
+
+
+
class Scene(vob.buoy.buoymanager.MultiBuoyManager):
- def __init__(self):
- vob.buoy.buoymanager.MultiBuoyManager.__init__(self,
+ def __init__(self, single = 0):
+ self.single = single
+ if single:
+ vob.buoy.buoymanager.MultiBuoyManager.__init__(self,
+ [mainNode], [ppconnector, tconnector],
+ SingleGeometer(self, context, nodeview),
+ context=context)
+ else:
+ vob.buoy.buoymanager.MultiBuoyManager.__init__(self,
[mainNode, mainNode2], [ppconnector, tconnector],
DoubleGeometer(self, context, nodeview),
context=context)
+
w.setCursor('default')
currentScene = Scene()
@@ -430,7 +479,10 @@
saveanim.saveframe("/tmp/buoyframeWithHand.png", w)
if k == "Ctrl-S":
- screenshots()
+ global currentScene
+ currentScene = Scene(1 - currentScene.single)
+ vob.AbstractUpdateManager.chg()
+
if k == "Ctrl-PrinT":
screenshots()
# if k == "Ctrl-B":
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Gzz-commits] fenfire/org/fenfire/demo buoyoing.py buoyoing1.py,
Janne V. Kujala <=