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

  2. <i id='xAIJR'><tr id='xAIJR'><dt id='xAIJR'><q id='xAIJR'><span id='xAIJR'><b id='xAIJR'><form id='xAIJR'><ins id='xAIJR'></ins><ul id='xAIJR'></ul><sub id='xAIJR'></sub></form><legend id='xAIJR'></legend><bdo id='xAIJR'><pre id='xAIJR'><center id='xAIJR'></center></pre></bdo></b><th id='xAIJR'></th></span></q></dt></tr></i><div id='xAIJR'><tfoot id='xAIJR'></tfoot><dl id='xAIJR'><fieldset id='xAIJR'></fieldset></dl></div>

    <legend id='xAIJR'><style id='xAIJR'><dir id='xAIJR'><q id='xAIJR'></q></dir></style></legend>
    • <bdo id='xAIJR'></bdo><ul id='xAIJR'></ul>

      <tfoot id='xAIJR'></tfoot>
    1. 具有圆角和阴影Kivy的图像

      Image with rounded corners and shadow Kivy(具有圆角和阴影Kivy的图像)
      <legend id='pHLVe'><style id='pHLVe'><dir id='pHLVe'><q id='pHLVe'></q></dir></style></legend>
        • <tfoot id='pHLVe'></tfoot>

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

              <bdo id='pHLVe'></bdo><ul id='pHLVe'></ul>
                <tbody id='pHLVe'></tbody>

              <i id='pHLVe'><tr id='pHLVe'><dt id='pHLVe'><q id='pHLVe'><span id='pHLVe'><b id='pHLVe'><form id='pHLVe'><ins id='pHLVe'></ins><ul id='pHLVe'></ul><sub id='pHLVe'></sub></form><legend id='pHLVe'></legend><bdo id='pHLVe'><pre id='pHLVe'><center id='pHLVe'></center></pre></bdo></b><th id='pHLVe'></th></span></q></dt></tr></i><div id='pHLVe'><tfoot id='pHLVe'></tfoot><dl id='pHLVe'><fieldset id='pHLVe'></fieldset></dl></div>
                本文介绍了具有圆角和阴影Kivy的图像的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                问题描述

                我怎么能对Kivy做这样的事情呢?

                推荐答案

                使用按钮的background_normal、background_down和border来实现此目的。让我们将您提供的两张图片命名为Norm.pngdown.png。请参考下面的示例了解详细信息。

                代码段

                Button:
                    background_normal: 'normal.png'
                    background_down: 'down.png'
                    border: 30,30,30,30
                

                示例

                main.py

                import kivy
                kivy.require('1.10.0')
                
                from kivy.app import App
                from kivy.uix.boxlayout import BoxLayout
                from kivy.lang import Builder
                
                Builder.load_string("""
                <RoundedButtons>:
                    orientation: 'vertical'
                    Button:
                        text: '[color=3333ff][b]Rounded Button 1[/b][/color]'
                        markup: True
                        background_normal: 'normal.png'
                        background_down: 'down.png'
                        border: 30,30,30,30
                    Button:
                        text: '[color=ff3333][b]Rounded Button 2[/b][/color]'
                        markup: True
                        background_normal: 'normal.png'
                        background_down: 'down.png'
                        border: 30,30,30,30
                """)
                
                
                class RoundedButtons(BoxLayout):
                    pass
                
                
                class TestApp(App):
                    def build(self):
                        return RoundedButtons()
                
                
                if __name__ == "__main__":
                    TestApp().run()
                

                输出

                这篇关于具有圆角和阴影Kivy的图像的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                相关文档推荐

                groupby multiple coords along a single dimension in xarray(在xarray中按单个维度的多个坐标分组)
                Group by and Sum in Pandas without losing columns(Pandas中的GROUP BY AND SUM不丢失列)
                Group by + New Column + Grab value former row based on conditionals(GROUP BY+新列+基于条件的前一行抓取值)
                Groupby and interpolate in Pandas(PANDA中的Groupby算法和插值算法)
                Pandas - Group Rows based on a column and replace NaN with non-null values(PANAS-基于列对行进行分组,并将NaN替换为非空值)
                Grouping pandas DataFrame by 10 minute intervals(按10分钟间隔对 pandas 数据帧进行分组)

              • <legend id='eTyOj'><style id='eTyOj'><dir id='eTyOj'><q id='eTyOj'></q></dir></style></legend>

                    <tbody id='eTyOj'></tbody>

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

                  <tfoot id='eTyOj'></tfoot>
                    <bdo id='eTyOj'></bdo><ul id='eTyOj'></ul>
                      <i id='eTyOj'><tr id='eTyOj'><dt id='eTyOj'><q id='eTyOj'><span id='eTyOj'><b id='eTyOj'><form id='eTyOj'><ins id='eTyOj'></ins><ul id='eTyOj'></ul><sub id='eTyOj'></sub></form><legend id='eTyOj'></legend><bdo id='eTyOj'><pre id='eTyOj'><center id='eTyOj'></center></pre></bdo></b><th id='eTyOj'></th></span></q></dt></tr></i><div id='eTyOj'><tfoot id='eTyOj'></tfoot><dl id='eTyOj'><fieldset id='eTyOj'></fieldset></dl></div>