Changeset - fca9832d207f
[Not reviewed]
default
0 1 0
drewp@bigasterisk.com - 20 years ago 2005-06-13 00:42:20
drewp@bigasterisk.com
turn on background image in stage.py
1 file changed with 2 insertions and 2 deletions:
0 comments (0 inline, 0 general)
light8/stage.py
Show inline comments
 
@@ -51,50 +51,50 @@ class Stage(Canvas):
 

	
 
        self.bind("<ButtonPress>", self.press)
 
        self.bind("<Motion>", self.motion)
 
        self.bind("<ButtonRelease>", self.release)
 
        self.bind("<Control-Key-a>", lambda ev: self.selectall())
 
        self.bind("<Control-Key-A>", lambda ev: self.clearselection())
 
#        self.bind("<Control-Shift-Key-a>",self.handlecontrol_a)
 
        
 
        self.halo=11 # search radius for clicked items
 

	
 
        self.mode=None # as you perform with the mouse, this goes
 
                       # from None to 'pressed','rectangle','levelchange', etc
 

	
 
        self.alllights=[]
 
        self.selectedlights=[]
 
        self.alllighttags={} # tag: name lookup
 

	
 
        self.subeditor = None
 

	
 

	
 
    def setimage(self,stageimage):
 
        img = Image('photo',file=stageimage)
 
        self.img=img # can't lose this!
 
        # print img.width()
 
#        self.create_image(0,0,anchor='nw',image=img)
 
#        self.config(width=img.width(),height=img.height())
 
        self.create_image(0,0,anchor='nw',image=img)
 
        self.config(width=img.width(),height=img.height())
 

	
 
        # we had the picture removed for good luck, but we remember
 
        # what the dimensions formerly was
 
        self.config(width=821,height=681, bg="grey40")
 

	
 

	
 
    def setsubediting(self,subeditor):
 
        self.subeditor = subeditor
 

	
 
    # (17:00:06) drewp: if yes, then self.itemconfigure(tagOrId, text=...)
 
    def updatelightlevel(self, name, level):
 
        tag = self.nametag(name)
 
        self.itemconfigure("level_%s" % tag, text=level)
 

	
 
    #
 
    # selection management
 
    #
 
    def updateselectionboxes(self):
 
        "make selection boxes that match self.selectedlights"
 
        self.delete("selectbox")
 
        for l in self.selectedlights:
 
            for c in self.getlightbboxes(l):
 
               self.create_rectangle(c[0]-2,c[1]-2,c[2]+2,c[3]+2,
 
                                     outline='red',tag="selectbox")
0 comments (0 inline, 0 general)