久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

    1. <small id='cO5in'></small><noframes id='cO5in'>

      <i id='cO5in'><tr id='cO5in'><dt id='cO5in'><q id='cO5in'><span id='cO5in'><b id='cO5in'><form id='cO5in'><ins id='cO5in'></ins><ul id='cO5in'></ul><sub id='cO5in'></sub></form><legend id='cO5in'></legend><bdo id='cO5in'><pre id='cO5in'><center id='cO5in'></center></pre></bdo></b><th id='cO5in'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='cO5in'><tfoot id='cO5in'></tfoot><dl id='cO5in'><fieldset id='cO5in'></fieldset></dl></div>
      <legend id='cO5in'><style id='cO5in'><dir id='cO5in'><q id='cO5in'></q></dir></style></legend>

      1. <tfoot id='cO5in'></tfoot>
        • <bdo id='cO5in'></bdo><ul id='cO5in'></ul>
      2. 如何在 Kivy 中制作重復(fù)的旋轉(zhuǎn)動(dòng)畫?

        How to make a repetitive rotating animation in Kivy?(如何在 Kivy 中制作重復(fù)的旋轉(zhuǎn)動(dòng)畫?)

              <bdo id='TyMb9'></bdo><ul id='TyMb9'></ul>
            • <i id='TyMb9'><tr id='TyMb9'><dt id='TyMb9'><q id='TyMb9'><span id='TyMb9'><b id='TyMb9'><form id='TyMb9'><ins id='TyMb9'></ins><ul id='TyMb9'></ul><sub id='TyMb9'></sub></form><legend id='TyMb9'></legend><bdo id='TyMb9'><pre id='TyMb9'><center id='TyMb9'></center></pre></bdo></b><th id='TyMb9'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='TyMb9'><tfoot id='TyMb9'></tfoot><dl id='TyMb9'><fieldset id='TyMb9'></fieldset></dl></div>
              <legend id='TyMb9'><style id='TyMb9'><dir id='TyMb9'><q id='TyMb9'></q></dir></style></legend>

              <small id='TyMb9'></small><noframes id='TyMb9'>

                    <tbody id='TyMb9'></tbody>
                1. <tfoot id='TyMb9'></tfoot>
                  本文介紹了如何在 Kivy 中制作重復(fù)的旋轉(zhuǎn)動(dòng)畫?的處理方法,對(duì)大家解決問題具有一定的參考價(jià)值,需要的朋友們下面隨著小編來一起學(xué)習(xí)吧!

                  問題描述

                  我想制作一個(gè)可以旋轉(zhuǎn)加載微調(diào)器圖像的動(dòng)畫小部件.我查看了 Animation 類,它似乎可以完成這項(xiàng)工作.但是我找不到一種方法來不斷地在一個(gè)方向上旋轉(zhuǎn)小部件

                  I want to make an animated widget that would rotate the loading spinner image. I've looked into the Animation class and it seems like it can do the job. But I couldn't find a way to keep rotating the widget in a single direction constantly

                  這是我的代碼:

                  from kivy.app import App
                  from kivy.lang import Builder
                  from kivy.uix.image import Image
                  from kivy.graphics import Rotate
                  from kivy.animation import Animation
                  from kivy.properties import NumericProperty
                  
                  Builder.load_string('''                                                                                                                                        
                  <Loading>:                                                                                                                                                 
                      canvas.before:                                                                                                                                             
                          PushMatrix                                                                                                                                             
                          Rotate:                                                                                                                                                
                              angle: self.angle                                                                                                                                  
                              axis: (0, 0, 1)                                                                                                                                    
                              origin: self.center                                                                                                                                
                      canvas.after:                                                                                                                                              
                          PopMatrix                                                                                                                                              
                  ''')
                  
                  class Loading(Image):
                      angle = NumericProperty(0)
                      def __init__(self, **kwargs):
                          super().__init__(**kwargs)
                          anim = Animation(angle = 360)
                          anim += Animation(angle = -360)
                          anim.repeat = True
                          anim.start(self)
                  
                  
                  class TestApp(App):
                      def build(self):
                          return Loading()
                  
                  TestApp().run()
                  

                  當(dāng)您啟動(dòng)它時(shí),您會(huì)看到該小部件在一個(gè)方向上旋轉(zhuǎn) 360 度,然后旋轉(zhuǎn)旋轉(zhuǎn).如何構(gòu)建動(dòng)畫序列,使角度不斷增加或每 360 次旋轉(zhuǎn)下降到 0?

                  When you launch it, you'll see that the widget rotates 360 degrees in one direction and then turns the rotation around. How could I build the animation sequence so that the angle would constantly keep increasing or would be dropped to 0 every 360-rotation?

                  推薦答案

                  您可以在 on_angle 方法中將角度設(shè)置為 0.這是一個(gè)稍作修改的版本:

                  You can set your angle to 0 inside on_angle method. Here's a slightly modified version:

                  from kivy.app import App
                  from kivy.lang import Builder
                  from kivy.uix.floatlayout import FloatLayout
                  from kivy.animation import Animation
                  from kivy.properties import NumericProperty
                  
                  Builder.load_string('''                               
                  <Loading>:
                      canvas.before:
                          PushMatrix
                          Rotate:
                              angle: root.angle
                              axis: 0, 0, 1
                              origin: root.center
                      canvas.after:
                          PopMatrix
                  
                  
                      Image:
                          size_hint: None, None
                          size: 100, 100
                          pos_hint: {'center_x': 0.5, 'center_y': 0.5}
                  ''')
                  
                  class Loading(FloatLayout):
                      angle = NumericProperty(0)
                      def __init__(self, **kwargs):
                          super(Loading, self).__init__(**kwargs)
                          anim = Animation(angle = 360, duration=2) 
                          anim += Animation(angle = 360, duration=2)
                          anim.repeat = True
                          anim.start(self)
                  
                      def on_angle(self, item, angle):
                          if angle == 360:
                              item.angle = 0
                  
                  
                  class TestApp(App):
                      def build(self):
                          return Loading()
                  
                  TestApp().run()
                  

                  這篇關(guān)于如何在 Kivy 中制作重復(fù)的旋轉(zhuǎn)動(dòng)畫?的文章就介紹到這了,希望我們推薦的答案對(duì)大家有所幫助,也希望大家多多支持html5模板網(wǎng)!

                  【網(wǎng)站聲明】本站部分內(nèi)容來源于互聯(lián)網(wǎng),旨在幫助大家更快的解決問題,如果有圖片或者內(nèi)容侵犯了您的權(quán)益,請(qǐng)聯(lián)系我們刪除處理,感謝您的支持!

                  相關(guān)文檔推薦

                  How to make a discord bot that gives roles in Python?(如何制作一個(gè)在 Python 中提供角色的不和諧機(jī)器人?)
                  Discord bot isn#39;t responding to commands(Discord 機(jī)器人沒有響應(yīng)命令)
                  Can you Get the quot;About mequot; feature on Discord bot#39;s? (Discord.py)(你能得到“關(guān)于我嗎?Discord 機(jī)器人的功能?(不和諧.py))
                  message.channel.id Discord PY(message.channel.id Discord PY)
                  How do I host my discord.py bot on heroku?(如何在 heroku 上托管我的 discord.py 機(jī)器人?)
                  discord.py - Automaticaly Change an Role Color(discord.py - 自動(dòng)更改角色顏色)

                2. <legend id='0fSQx'><style id='0fSQx'><dir id='0fSQx'><q id='0fSQx'></q></dir></style></legend>

                    <tfoot id='0fSQx'></tfoot>
                          <bdo id='0fSQx'></bdo><ul id='0fSQx'></ul>
                          <i id='0fSQx'><tr id='0fSQx'><dt id='0fSQx'><q id='0fSQx'><span id='0fSQx'><b id='0fSQx'><form id='0fSQx'><ins id='0fSQx'></ins><ul id='0fSQx'></ul><sub id='0fSQx'></sub></form><legend id='0fSQx'></legend><bdo id='0fSQx'><pre id='0fSQx'><center id='0fSQx'></center></pre></bdo></b><th id='0fSQx'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='0fSQx'><tfoot id='0fSQx'></tfoot><dl id='0fSQx'><fieldset id='0fSQx'></fieldset></dl></div>
                            <tbody id='0fSQx'></tbody>

                          <small id='0fSQx'></small><noframes id='0fSQx'>

                            主站蜘蛛池模板: 欧美在线亚洲 | 亚洲欧美国产精品久久 | 国产精品日韩在线观看 | 亚洲综合视频 | 中文字幕精品视频 | 亚洲精品在线看 | 91影院在线观看 | 欧美成人猛片aaaaaaa | 国产一级片 | 免费视频一区 | 精品亚洲一区二区三区四区五区高 | 亚洲精品一区二三区不卡 | 精品国产91 | 米奇7777狠狠狠狠视频 | 伊人久久在线 | 欧美一区二区 | 精品国产乱码久久久久久闺蜜 | 亚洲福利一区二区 | 一区精品视频在线观看 | 曰韩三级 | 天天干天天干 | 午夜a区| 水蜜桃亚洲一二三四在线 | 国产精品人人做人人爽 | 国产福利视频在线观看 | 91大神在线资源观看无广告 | 一区二区在线观看av | 亚洲精精品 | 91一区二区在线观看 | 国产日韩欧美电影 | 亚洲一区二区三区在线播放 | 久久精品欧美一区二区三区麻豆 | 久久99蜜桃综合影院免费观看 | 成人精品国产免费网站 | 久久精品一区 | av黄色国产| 免费观看日韩av | 国产精品一区一区 | 日韩在线免费播放 | 久久久999免费视频 999久久久久久久久6666 | 亚洲成人精品在线观看 |