# HG changeset patch # User Thinker K.F. Li # Date 1297840298 -28800 # Node ID f89d3ee130ded034e3a266c49789f8ac5b91c935 # Parent 5313bbfafa67e7fb1dc076823178a34b8d10989b Remove TweenObject._update_tween_style diff -r 5313bbfafa67 -r f89d3ee130de pyink/tween.py --- a/pyink/tween.py Wed Feb 16 15:07:44 2011 +0800 +++ b/pyink/tween.py Wed Feb 16 15:11:38 2011 +0800 @@ -449,7 +449,7 @@ newobj.setAttribute("ref", s.getAttribute("id")) obj.appendChild(newobj) pass - self.update_tween_object_scale(s, d, p, newobj) + self._update_tween_object_scale(s, d, p, newobj) pass elif typ == self.TWEEN_TYPE_NORMAL and newobj == None: newobj = s.duplicate(self._doc) @@ -458,47 +458,7 @@ pass pass - def _update_tween_style(self, s, d, p, newobj): - if d.name() == 'svg:use': - return - try: - s_style = s.getAttribute('style') - except: - s_attrs = {} - else: - s_attrs = _parse_style(s_style) - pass - - try: - d_style = d.getAttribute('style') - except: - d_attrs = {} - else: - d_attrs = _parse_style(d_style) - pass - - attrs = dict(s_attrs) - - if s_attrs.has_key('opacity'): - start_opacity = float(s_attrs['opacity']) - else: - start_opacity = 1 - pass - - if d_attrs.has_key('opacity'): - end_opacity = float(d_attrs['opacity']) - else: - end_opacity = 1 - pass - - cur_opacity = start_opacity * (1 - p) + end_opacity * p - attrs['opacity'] = '%g' % (cur_opacity) - - new_style = _gen_style(attrs) - newobj.setAttribute('style', new_style) - pass - - def update_tween_object_scale(self, start, stop, percent, newobj): + def _update_tween_object_scale(self, start, stop, percent, newobj): start_attrs = {} _parse_style_ani(start, start_attrs) _parse_attr_ani(start, start_attrs)