comparison pyink/tween.py @ 1156:ad9c44a08645

If an object does not exist in the destination group, we should duplicate it.
author wycc
date Mon, 27 Dec 2010 22:57:52 +0800
parents 71c72e8d6755
children 3a891dccabd8
comparison
equal deleted inserted replaced
1155:5db4d769387c 1156:ad9c44a08645
5 5
6 class TweenObject: 6 class TweenObject:
7 TWEEN_TYPE_NORMAL = 0 7 TWEEN_TYPE_NORMAL = 0
8 TWEEN_TYPE_RELOCATE = 1 8 TWEEN_TYPE_RELOCATE = 1
9 TWEEN_TYPE_SCALE = 2 9 TWEEN_TYPE_SCALE = 2
10 10
11 def __init__(self,doc,dom): 11 def __init__(self,doc,dom):
12 self.document = doc 12 self.document = doc
13 self.dom = dom 13 self.dom = dom
14 try: 14 try:
15 self.width = float(dom.getAttribute("width")) 15 self.width = float(dom.getAttribute("width"))
76 while start_node: 76 while start_node:
77 start_node_id = start_node.getAttribute('id') 77 start_node_id = start_node.getAttribute('id')
78 try: 78 try:
79 stop_node = stop_nodes[start_node_id] 79 stop_node = stop_nodes[start_node_id]
80 except KeyError: 80 except KeyError:
81 self.updateTweenObject(duplicate_group, tween_type,
82 start_node, start_node,
83 percent, dup_node)
81 start_node = start_node.next() 84 start_node = start_node.next()
82 continue 85 continue
83 86
84 dup_node = dup_nodes.setdefault(start_node_id, None) 87 dup_node = dup_nodes.setdefault(start_node_id, None)
85 88