1
1
mirror of https://github.com/kivy/kivy.git synced 2025-02-24 09:32:01 +00:00
kivy/examples/kv/app_stencil.kv

28 lines
563 B
Plaintext
Raw Normal View History

Widget:
canvas:
StencilPush
# create a rectangle mask, from pos 100, 100, with a 100, 100 size.
Rectangle:
pos: 100, 100
size: 100, 100
StencilUse
# we want to show a big green rectangle, however, the previous stencil
# mask will crop us :)
Color:
rgb: 0, 1, 0
Rectangle:
size: 900, 900
StencilUnUse
# Remove the mask previously set
Rectangle:
pos: 100, 100
size: 100, 100
StencilPop