kivy studies

Post on 17-Feb-2017

336 Views

Category:

Education

0 Downloads

Preview:

Click to see full reader

TRANSCRIPT

KIVY STUDIES #3.5DAISUKE SAITO

2

OUTLINE

• About Kivy

• Installation

• Let’s try Kivy

• Build to Android APP

3

ABOUT KIVY

• ナチュナルユーザーインターフェースの環境• Windows, Mac, Linux, Android, iOS, RaspberryPi で動作するアプリケーションを開発できる

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

LET’S TRY KIVYSIMPLE APP

引用 t: http://qiita.com/Ds110/items/2988646cb6622648b463

THE USING KV LANGUAGE

Referencet: http://qiita.com/Ds110/items/2988646cb6622648b463

7

BUILD TO ANDROID APP

8

BUILDZER.SPEC

9

BUILD TO ANDROID APP

10

LT

11

日本語を扱う

• 基本は対応していない• フォントを追加することにより表示可能

12

このように書く# -*- coding: utf-8 -*-import kivy

from kivy.core.text import LabelBase, DEFAULT_FONT

from kivy.app import Appfrom kivy.uix.button import Button

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

14

表示できました

top related