Download - Kivy studies
![Page 1: Kivy studies](https://reader034.vdocuments.mx/reader034/viewer/2022050900/58a6f3481a28abcf0e8b66b9/html5/thumbnails/1.jpg)
KIVY STUDIES #3.5DAISUKE SAITO
![Page 2: Kivy studies](https://reader034.vdocuments.mx/reader034/viewer/2022050900/58a6f3481a28abcf0e8b66b9/html5/thumbnails/2.jpg)
2
OUTLINE
• About Kivy
• Installation
• Let’s try Kivy
• Build to Android APP
![Page 3: Kivy studies](https://reader034.vdocuments.mx/reader034/viewer/2022050900/58a6f3481a28abcf0e8b66b9/html5/thumbnails/3.jpg)
3
ABOUT KIVY
• ナチュナルユーザーインターフェースの環境• Windows, Mac, Linux, Android, iOS, RaspberryPi で動作するアプリケーションを開発できる
![Page 4: Kivy studies](https://reader034.vdocuments.mx/reader034/viewer/2022050900/58a6f3481a28abcf0e8b66b9/html5/thumbnails/4.jpg)
4
INSTALLATION FOR WINDOWS1. python -m pip install --upgrade pip wheel setuptools
2. python -m pip install docutils pygments pypiwin32 kivy.deps.sdl2 kivy.deps.glew kivy.deps.gstreamer --extra-index-url https://kivy.org/downloads/packages/simple/
3. python –m pip install kivy
• OpenCV 2.0 – Camera input.
• Pillow – Image and text display.
• PyEnchant – Spelling correction.
Other OS
http://qiita.com/Ds110/items/2988646cb6622648b463
http://qiita.com/dodo5522/items/46058b6cb3e7c94dd984
![Page 5: Kivy studies](https://reader034.vdocuments.mx/reader034/viewer/2022050900/58a6f3481a28abcf0e8b66b9/html5/thumbnails/5.jpg)
LET’S TRY KIVYSIMPLE APP
引用 t: http://qiita.com/Ds110/items/2988646cb6622648b463
![Page 6: Kivy studies](https://reader034.vdocuments.mx/reader034/viewer/2022050900/58a6f3481a28abcf0e8b66b9/html5/thumbnails/6.jpg)
THE USING KV LANGUAGE
Referencet: http://qiita.com/Ds110/items/2988646cb6622648b463
![Page 7: Kivy studies](https://reader034.vdocuments.mx/reader034/viewer/2022050900/58a6f3481a28abcf0e8b66b9/html5/thumbnails/7.jpg)
7
BUILD TO ANDROID APP
![Page 8: Kivy studies](https://reader034.vdocuments.mx/reader034/viewer/2022050900/58a6f3481a28abcf0e8b66b9/html5/thumbnails/8.jpg)
8
BUILDZER.SPEC
![Page 9: Kivy studies](https://reader034.vdocuments.mx/reader034/viewer/2022050900/58a6f3481a28abcf0e8b66b9/html5/thumbnails/9.jpg)
9
BUILD TO ANDROID APP
![Page 10: Kivy studies](https://reader034.vdocuments.mx/reader034/viewer/2022050900/58a6f3481a28abcf0e8b66b9/html5/thumbnails/10.jpg)
10
LT
![Page 11: Kivy studies](https://reader034.vdocuments.mx/reader034/viewer/2022050900/58a6f3481a28abcf0e8b66b9/html5/thumbnails/11.jpg)
11
日本語を扱う
• 基本は対応していない• フォントを追加することにより表示可能
![Page 12: Kivy studies](https://reader034.vdocuments.mx/reader034/viewer/2022050900/58a6f3481a28abcf0e8b66b9/html5/thumbnails/12.jpg)
12
このように書く# -*- coding: utf-8 -*-import kivy
from kivy.core.text import LabelBase, DEFAULT_FONT
from kivy.app import Appfrom kivy.uix.button import Button
![Page 13: Kivy studies](https://reader034.vdocuments.mx/reader034/viewer/2022050900/58a6f3481a28abcf0e8b66b9/html5/thumbnails/13.jpg)
13
このように書くLabelBase.register(DEFAULT_FONT, 'VL-Gothic-Regular.ttf')
class MyApp(App):
def build(self):
return Button(text='こんにちは ', font_size=“50pt")
if __name__ == '__main__':
MyApp().run()
参考 : http://blog.livedoor.jp/katsuooo_l/archives/42346599.html
![Page 14: Kivy studies](https://reader034.vdocuments.mx/reader034/viewer/2022050900/58a6f3481a28abcf0e8b66b9/html5/thumbnails/14.jpg)
14
表示できました