Changeset 959

Show
Ignore:
Timestamp:
07/04/09 10:12:55 (8 months ago)
Author:
fdb
Message:

Changed Layer constructor to accept name and CENTER origin.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • nodebox-gl/trunk/nodebox/graphics/context.py

    r871 r959  
    13281328 
    13291329    def __init__(self, x=0, y=0, width=None, height=None, origin=(0,0),  
    1330                  scale=1.0, rotation=0, opacity=1.0, duration=1.0, parent=None): 
     1330                 scale=1.0, rotation=0, opacity=1.0, duration=1.0, name=None,  
     1331                 parent=None): 
    13311332        """ Creates a new drawing layer that can be appended to the canvas. 
    13321333        The duration defines the time (seconds) it takes to animate transformations or opacity. 
     
    13341335        """ 
    13351336        if origin == CENTER: 
    1336             origin = (0.5,0.5),  
     1337            origin = (0.5,0.5) 
    13371338            origin_mode = RELATIVE 
    13381339        else: 
    13391340            origin_mode = ABSOLUTE 
    13401341        Prototype.__init__(self) # facilitates extension on the fly. 
    1341         self.name      = None 
     1342        self.name      = name 
    13421343        self.parent    = parent 
    13431344        self._x        = Transition(x)