Add support for mapping image properties

This exposes a slint.Image class, which has a load_from_path class
method as well as size/width/height properties.

cc #4202
This commit is contained in:
Simon Hausmann 2024-02-06 11:52:28 +01:00 committed by Simon Hausmann
parent 9aa931f1f8
commit 93efd74e24
6 changed files with 97 additions and 3 deletions

View file

@ -8,3 +8,5 @@ def load_file(path):
compdef = compiler.build_from_path(path)
instance = compdef.create()
return instance
Image = native.PyImage