当前位置: 首页>>代码示例>>Python>>正文


Python Animation.stop_all方法代码示例

本文整理汇总了Python中kivy.animation.Animation.stop_all方法的典型用法代码示例。如果您正苦于以下问题:Python Animation.stop_all方法的具体用法?Python Animation.stop_all怎么用?Python Animation.stop_all使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在kivy.animation.Animation的用法示例。


在下文中一共展示了Animation.stop_all方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: toggle

# 需要导入模块: from kivy.animation import Animation [as 别名]
# 或者: from kivy.animation.Animation import stop_all [as 别名]
def toggle(self):
		Animation.stop_all(self, 'x')
		anim = self.animation_for_toggling_state()
		self._open = not self._open
		anim.start(self) 
开发者ID:kivymd,项目名称:KivyMD,代码行数:7,代码来源:slidingpanel.py

示例2: pitch

# 需要导入模块: from kivy.animation import Animation [as 别名]
# 或者: from kivy.animation.Animation import stop_all [as 别名]
def pitch(self, value, time):
        self.rotate = [value, 1.0, 0.0, 0.0]
        Animation.stop_all(self)
        Animation(rotate=[0.0, 1.0, 0.0, 0.0], duration=time).start(self) 
开发者ID:kpiorno,项目名称:kivy3dgui,代码行数:6,代码来源:canvas3d.py

示例3: walk

# 需要导入模块: from kivy.animation import Animation [as 别名]
# 或者: from kivy.animation.Animation import stop_all [as 别名]
def walk(self, value, time):
        self.translate = [0.0, 0.0, value]
        Animation.stop_all(self)
        Animation(translate=(0.0, 0.0, 0.0), duration=time).start(self) 
开发者ID:kpiorno,项目名称:kivy3dgui,代码行数:6,代码来源:canvas3d.py

示例4: strafe

# 需要导入模块: from kivy.animation import Animation [as 别名]
# 或者: from kivy.animation.Animation import stop_all [as 别名]
def strafe(self, value, time):
        self.translate = [value, 0.0, 0.0]
        Animation.stop_all(self)
        Animation(translate=(0.0, 0.0, 0.0), duration=time).start(self) 
开发者ID:kpiorno,项目名称:kivy3dgui,代码行数:6,代码来源:canvas3d.py

示例5: up

# 需要导入模块: from kivy.animation import Animation [as 别名]
# 或者: from kivy.animation.Animation import stop_all [as 别名]
def up(self, value, time):
        self.translate = [0.0, value, 0.0]
        Animation.stop_all(self)
        Animation(translate=(0.0, 0.0, 0.0), duration=time).start(self) 
开发者ID:kpiorno,项目名称:kivy3dgui,代码行数:6,代码来源:canvas3d.py

示例6: _dequeue_output_label

# 需要导入模块: from kivy.animation import Animation [as 别名]
# 或者: from kivy.animation.Animation import stop_all [as 别名]
def _dequeue_output_label(self, dt):
        if not self._output_label_queue:
            return

        # print('dequeueing', self._output_label_queue)

        t = time()
        i = 0
        while (time() - t) < 0.005:
            i += 1
            if not self._output_label_queue:
                break
            label_text = self._output_label_queue.pop(0)
            label = self._add_output_label(*label_text, scroll_to=False)
        print('Rendered {} labels in {}'.format(i, time() - t))
        Animation.stop_all(self.scrollview, 'scroll_x', 'scroll_y')
        self.scrollview.scroll_to(label)

        self.dequeue_scheduled.cancel()
        self.dequeue_scheduled = None

        if len(self._output_label_queue) == 0 and self.clear_scheduled:
            self.clear_scheduled.cancel()
            self.clear_scheduled = None
        elif len(self._output_label_queue) > 0:
            self.dequeue_scheduled = Clock.schedule_once(
                self._dequeue_output_label, 0.05)

        if (self.awaiting_label_display_completion and
            len(self._output_label_queue) == 0):
            self.awaiting_label_display_completion = False
            self._execution_complete() 
开发者ID:inclement,项目名称:Pyonic-interpreter,代码行数:34,代码来源:interpreter.py

示例7: _show_bubble

# 需要导入模块: from kivy.animation import Animation [as 别名]
# 或者: from kivy.animation.Animation import stop_all [as 别名]
def _show_bubble(self):
        self.alpha = 1
        Animation.stop_all(self, 'alpha') 
开发者ID:BillBillBillBill,项目名称:Tickeys-linux,代码行数:5,代码来源:videoplayer.py

示例8: toggle

# 需要导入模块: from kivy.animation import Animation [as 别名]
# 或者: from kivy.animation.Animation import stop_all [as 别名]
def toggle(self):
        Animation.stop_all(self, 'x')
        Animation.stop_all(self.shadow, 'color')
        if self._open:
            if self.side == 'left':
                target_x = -1 * self.width
            else:
                target_x = Window.width

            sh_anim = Animation(duration=self.anim_length_open,
                                t=self.animation_t_open,
                                color=[0, 0, 0, 0])
            sh_anim.start(self.shadow)
            self._get_main_animation(duration=self.anim_length_close,
                                     t=self.animation_t_close,
                                     x=target_x,
                                     is_closing=True).start(self)
            self._open = False
        else:
            if self.side == 'left':
                target_x = 0
            else:
                target_x = Window.width - self.width
            Animation(duration=self.anim_length_open, t=self.animation_t_open,
                      color=[0, 0, 0, 0.5]).start(self.shadow)
            self._get_main_animation(duration=self.anim_length_open,
                                     t=self.animation_t_open,
                                     x=target_x,
                                     is_closing=False).start(self)
            self._open = True 
开发者ID:kiok46,项目名称:Blogs-Posts-Tutorials,代码行数:32,代码来源:slidingpanel.py

示例9: update_from_scroll

# 需要导入模块: from kivy.animation import Animation [as 别名]
# 或者: from kivy.animation.Animation import stop_all [as 别名]
def update_from_scroll(self, *largs):
        '''Force the reposition of the content, according to current value of
        :attr:`scroll_x` and :attr:`scroll_y`.

        This method is automatically called when one of the :attr:`scroll_x`,
        :attr:`scroll_y`, :attr:`pos` or :attr:`size` properties change, or
        if the size of the content changes.
        '''
        if not self._viewport:
            return
        vp = self._viewport

        # update from size_hint
        if vp.size_hint_x is not None:
            vp.width = vp.size_hint_x * self.width
        if vp.size_hint_y is not None:
            vp.height = vp.size_hint_y * self.height

        if vp.width > self.width:
            sw = vp.width - self.width
            x = self.x - self.scroll_x * sw
        else:
            x = self.x
        if vp.height > self.height:
            sh = vp.height - self.height
            y = self.y - self.scroll_y * sh
        else:
            y = self.top - vp.height

        # from 1.8.0, we now use a matrix by default, instead of moving the
        # widget position behind. We set it here, but it will be a no-op most of
        # the time.
        vp.pos = 0, 0
        self.g_translate.xy = x, y

        # New in 1.2.0, show bar when scrolling happens and (changed in 1.9.0)
        # fade to bar_inactive_color when no scroll is happening.
        Clock.unschedule(self._bind_inactive_bar_color)
        self.unbind(bar_inactive_color=self._change_bar_color)
        Animation.stop_all(self, '_bar_color')
        self.bind(bar_color=self._change_bar_color)
        self._bar_color = self.bar_color
        Clock.schedule_once(self._bind_inactive_bar_color, .5) 
开发者ID:BillBillBillBill,项目名称:Tickeys-linux,代码行数:45,代码来源:scrollview.py


注:本文中的kivy.animation.Animation.stop_all方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。