Kivy is a full featured framework for creating novel and performant
user interfaces, such as multitouch applications, under the LGPL 3
license. The framework work on Windows, MacOSX, Linux and Android.
All downloads are available on the website :
Kivy 1.0.2 is in _Alpha_ state, and indented to a _developer
audience_. Please test and report issues at :
http://github.com/tito/kivy/issues.
The final release of Kivy 1.0 is planned on 1st March 2011.
The goal of this release is to spot any issues before the final
release, and motive you to write awesome softwares and games !
Changelog - 1.0.2-alpha
=======================
Core
----
- New kivy.require() method to require a minimum kivy version
- New App.stop() method
- [#22] Autodetection of GLES2 support
- Speedup Kivy language callbacks
- Reduce text memory footprint using new luminance_alpha format
- Remove old vsync/fps token in Configuration, use maxfps.
- FPS is limited to 60 by default now.
- Fixes for pip installer
Graphics
--------
- New Ellipse.segments property
- Support of luminance + luminance_alpha color format in texture
- Speedup of internals classes (VBO, VertexBatch, Buffer)
- [#42, #48] Fixes and activate graphics compiler
- Fixes compilation for Linux + ATI card
Documentation
-------------
- [#54] Enhance Vector documentation
- Installation for Windows, MacOSX, Linux and Android
- Fixes Quickstart
Widgets
-------
- New layouts: FloatLayout, GridLayout and AnchorLayout
Examples
--------
- Fixes for touchtracer to make it run on android
Android
-------
- Initial release of Android Kivy launcher.
- You need Android 2.2 + OpenGL ES 2.0 support
- Tested on Motorola Droid 1, Motorola Droid 2, Samsung Galaxy Tab,
Xperia 10.
--
Mathieu, Christopher and Thomas
http://kivy.org/#aboutus
$ git pull origin master
$ python setup.py build_ext --inplace -f
2011/2/10 Mathieu Virbel <m...@kivy.org>:
2011/2/10 Mathieu Virbel <m...@kivy.org>:
ImportError: No module named event
Is the compiled pyrex dll missing in the windows package?
Look like the portable didn't build correctly.
The windows package have been redone, and uploaded.
Thanks for reporting !
Mathieu
2011/2/10 Matthias Georgi <matti....@gmail.com>:
Mathieu
2011/2/10 Mathieu Virbel <m...@kivy.org>:
--
Harsh J
www.harshj.com
How hard is it to port a pymt app to kivy?
For an app of ~10days of development, i've spend 2 for moving on Kivy,
not completly finished, because i'm still learning how to do.
That's better to restart the ui from scratch instead of trying to
port. If you simply port the app to Kivy, you'll not use the new Kivy
way to do ui, and still think as a PyMT dev. That's the hardest part i
think.
(i know that it will not really answer you, but they are no general
answer... :/)
But don't hesitate to bother us if you have any trouble :)
Mathieu
2011/2/10 Matthias Georgi <matti....@gmail.com>:
for example to render all rectangles at once in a button matrix we are
doing this:
def draw_tiles(self):
with gx_begin(GL_QUADS):
for i in range(self.visible_clip_cols()):
for j in range(self.visible_rows):
self.draw_tile(i, j)
On this particular case:
1. i would create all the rectangle at start
from kivy.graphics import Rectangle
class Matrix(Widget):
+ in __init__():
self.grects = gr = {}
for i in range(maxcols):
for j in range(maxrows):
gr[(i, j)] = Rectangle(pos=..., size=...)
2. i would create a custom property for knowing if the row/col is
dipslayed. But we don't have a DictProperty (that could be done.)
from kivy.properties import ObjectProperty
class Matrix(Widget):
visible_grid = ObjectProperty({})
+ attach event that remove all rectangle on canvas, and reattach only
the visible one
def on_visible_grid(self, instance, value):
# visible grid changed.
self.canvas.clear()
for key, value in value.iterkeys():
if value:
self.canvas.add(self.grects[key])
=> Then, to use it:
wid = Matrix()
grid = wid.visible_grid
grid[(10, 5)] = True
# update the grid
wid.visible_grid = grid
grid[(1, 2)] = True
grid[(10, 2)] = True
grid[(10, 5)] = Fals
# update the grid
wid.visible_grid = grid
The assignment of wid.visible_grid = grid could be removed in a
future, but right now, that's the only way we have to detect that the
content of the property changed.
More reading available at :
http://kivy.org/docs/api-kivy.properties.html
http://kivy.org/docs/api-kivy.uix.widget.html#usage-of-properties
Read also the Image source code, that may be the simplest widget done,
and using the power of properties.
2011/2/10 Matthias Georgi <matti....@gmail.com>:
Just a very quick test, working, not commented, use with care :)
2011/2/10 Mathieu Virbel <m...@kivy.org>:
The example is indeed very insightful.I think I understand the new mechanism.
still some questions:
1. Is there some kind of render thread? I'm asking because of the
schedule functions.
2. I understand the reason for triggering the canvas interaction, but
not for triggerering the rectangle creation. Why is this asynchronous?
3. How is the supposed interaction, if you have several widgets which
can change the layout? It could be complicated to find out, what
widget needs to be redrawn.
4. Do you sort the render commands? e.g. draw all rectangles in one
batch to avoid opengl state changes.
Matthias
1) Not yet; But that is a possible future optimization we will look into.
4) Kivy has this new concept of 'Graphics Compilers'.
I.e. if you use the new graphics API (the canvas stuff) then a bunch of compilers will look at what is about to be drawn and optimize the way it is drawn.
E.g. you draw 1000 rectangles. It will detect that and batch-draw them. Or say you have many many tiny textures. A compiler could detect that, put them into one large texture atlas and use that instead.
Note, however, that there are no really sophisticated compilers available yet.
Right now we're finalizing and stabilizing the API for the release next month.
Adding compilers can be done without breaking existing code.
If you use GL directly you'll obviously have to take care of calling it efficiently yourself.
Or you contribute compilers and make everyone happy. :-)
Christopher
It's asynchronous because of properties observer -> handler.
Just imagine that you are creating a Matrix(cols=50,rows=10,squaresize=88)
Theses 3 properties are changing the rectangles primitives right ?
So, each time one of theses properties change, you must change primitives too.
In the example, we are recreating all of them (easier to write, not
exactly the best in term of performance)
So, why asynchronous ? Because when you change a property, the trigger
will be called immediatly.
So in creation, your object will just assign cols=50 -> trigger creation
then rows=10 -> trigger creation
then squaresize=88 -> trigger creation.
That will be the same if you are have your widget, and doing:
wid = Matrix()
wid.rows = 10 # trigger creation
wid.squaresize = 99 # trigger creation again
So, by scheduling the creation only once at next iteration, you avoid
creation/deletion.
(That's the first time i'm trying to describe this behavior, hope that
is understandable.)
>
> 3. How is the supposed interaction, if you have several widgets which
> can change the layout? It could be complicated to find out, what
> widget needs to be redrawn.
I don't understand clearly the questions. But except your example with
MAtrix class, you can use our Kivy Language for describing drawing of
UI.
Let's say you've a CustomWidget with a property state, that can be
"down" or "normal".
With kivy language, you can use a file like this:
#:kivy 1.0
<CustomWidget>:
canvas:
Color:
rgb: (1, 0, 0) if self.state == 'normal' else (0, 1, 0)
Rectangle:
pos: self.pos
size: self.size
I think you can understand easily the file. This will be automatically
applied on every CustomWidget you'll create, and automatically adapt
Rectangle pos if the widget pos change, adapt color if the state
property change etc.
You can read more about the lang here : http://kivy.org/docs/api-kivy.lang.html
Matthias
Not sure if that is what you meant.
That's would be appreciated, we really need more work on that :)
> we had also performance problems with text labels.
> are they optimized as textures right now?
Text label are texture, as PyMT before yes.
But when you said you've performance trouble, is it on desktop, or android ?
> how is the canvas backend for android?
> Is this just plain opengl?
Same as desktop. Exactly the same code.
> main motivation for porting to kivy would be the oppurtunity to
> release on android.
Same for me :) Android platform (at least on my phone) is not perfect,
but exist. This is the first release, and we've focus our work of
making a new way of making UI, event, shader etc. Now that's normal
that we hit some performance issue (even if it would be not the case),
mainly because we need to check more our internals, compiler, prevent
too much compilation etc..
Cheers Matthias