from kivy.graphics.texture import Texture texture = Texture.create(source='image.png')
from kivy.graphics.texture import Texture from kivy.graphics import Color, Ellipse texture = Texture.create(size=(100, 100)) with texture: # Clear the texture to transparent Color(0, 0, 0, 0) Ellipse(pos=(0, 0), size=(100, 100)) # Draw a red circle Color(1, 0, 0) Ellipse(pos=(25, 25), size=(50, 50))
from kivy.uix.image import Image image = Image(source='image.png')In this example, the Texture is created when the Image widget is initialized. The Kivy library includes the kivy.graphics.texture package.