This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
''' | |
FBO example | |
=========== | |
This is an example of how to use FBO (Frame Buffer Object) to speedup graphics. | |
An Fbo is like a texture that you can draw on it. | |
By default, all the children are added in the canvas of the parent. | |
When you are displaying thousand of widget, you'll do thousands of graphics | |
instructions each frame. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from kivy.app import App | |
from kivy.graphics.fbo import Fbo | |
from kivy.uix.widget import Widget | |
from kivy.graphics import Color, Rectangle, GraphicException | |
from kivy.clock import Clock | |
from kivy.graphics.texture import Texture | |
from kivy.properties import ObjectProperty | |
####CEF IMPORT #### | |
#### |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# An example of embedding CEF browser in wxPython on Linux. | |
import ctypes, os, sys | |
libcef_so = os.path.join(os.path.dirname(os.path.abspath(__file__)), 'libcef.so') | |
if os.path.exists(libcef_so): | |
# Import local module | |
ctypes.CDLL(libcef_so, ctypes.RTLD_GLOBAL) | |
if 0x02070000 <= sys.hexversion < 0x03000000: | |
import cefpython_py27 as cefpython | |
else: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from kivy.app import App | |
from kivy.uix.button import Button | |
from kivy.uix.widget import Widget | |
import dbus.service | |
from dbus.mainloop.glib import DBusGMainLoop | |
class UI(Widget): | |
def __init__(self, **kwargs): |
NewerOlder