changeset 232:6862f0b57b7a

shaded curve experiment
author drewp@bigasterisk.com
date Sun, 05 Jun 2005 07:29:48 +0000
parents 2c02748847f0
children e910fda2cd1f
files light9/curve.py
diffstat 1 files changed, 13 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/light9/curve.py	Sun Jun 05 07:28:50 2005 +0000
+++ b/light9/curve.py	Sun Jun 05 07:29:48 2005 +0000
@@ -7,6 +7,7 @@
 import run_local
 from light9 import Submaster, dmxclient, networking
 from light9.TLUtility import make_attributes_from_args
+from light9.dmxchanedit import gradient
 
 class Curve:
     """curve does not know its name. see Curveset"""
@@ -113,9 +114,19 @@
         
         self.delete('curve')
 
+        for x in range(0,self.winfo_width(),3):
+            wx = self.world_from_screen(x,0)[0]
+            mag = self.curve.eval(wx)
+            self.create_line(x,0, x,70,
+                             fill=gradient(mag,
+                                           low=(20,10,50),
+                                           high=(255,187,255)),
+                             width=3, tags='curve')
+
+
         self._draw_markers(visible_x)
         
-        self._draw_line(visible_idxs,visible_points)
+        self._draw_line(visible_points)
         
         self.dots = {} # idx : canvas rectangle
 
@@ -146,7 +157,7 @@
                          tags=('curve',))
 
 
-    def _draw_line(self,visible_idxs,visible_points):
+    def _draw_line(self,visible_points):
         linepts=[]
         step=1
         linewidth=2