Changeset - 6faae180d1c5
[Not reviewed]
default
0 2 0
drewp - 22 years ago 2002-07-07 05:05:36

conv image to gif, clean up source formatting
2 files changed with 5 insertions and 3 deletions:
0 comments (0 inline, 0 general)
light8/guysanddolls.gif
Show inline comments
 
binary diff not shown
Show images
light8/stage.py
Show inline comments
 
@@ -150,15 +150,17 @@ class Stage(Canvas):
 
            delta = self.lmbstart[1]-ev.y
 
            print "change by",delta
 

	
 
        if self.lmbstate=='rectangle':
 
            sr = self.find_withtag('selectrect')
 
            if not sr:
 
                sr=self.create_rectangle( self.lmbstart[0],self.lmbstart[1],coords[0],coords[1],tag='selectrect')
 
#                sr=self.create_rectangle( *(self.lmbstart+coords), tag='selectrect' )
 
                sr=self.create_rectangle( self.lmbstart[0],self.lmbstart[1],coords[0],coords[1],
 
                                          outlinestipple='gray50',
 
                                          tag='selectrect')
 

	
 
            # move rectangle with mouse
 
            self.coords(sr,*(self.lmbstart+coords))
 

	
 
            # redo the dynselection with the new rectangle
 
            self.replacedynselection([o for o in self.findoverlappinglights((self.lmbstart+coords),1)])
 

	
 
            # need to handle ctrl
 
@@ -233,13 +235,13 @@ class Stage(Canvas):
 
                        lights.append(n)
 
        return lights
 

	
 
root=Tk()
 
root.wm_geometry("+376+330")
 
s=Stage(root)
 
s.setimage('guysanddolls.ppm')
 
s.setimage('guysanddolls.gif')
 
s.pack()
 
s.addlight('drew',(330,640),(90,20))
 
s.addlight('house',(360,640))
 
s.addlight('barn',(390,640))
 

	
 
root.mainloop()
0 comments (0 inline, 0 general)