开发者

Best GUI/layout library for Python that can be easily rendered into a PNG?

开发者 https://www.devze.com 2022-12-07 20:29 出处:网络
I\'m working on a project that requires me to design some basic UIs - really they\'re just layouts of some text/shapes/images, not even interactive.

I'm working on a project that requires me to design some basic UIs - really they're just layouts of some text/shapes/images, not even interactive.

However, in the end, these UIs need to be rendered into fixed-size PNGs. (I'm rendering them onto a hacked Kindle screen, which basically has a built-in command to overwrite the screen contents with a PNG)

I want to be able to define these UIs in a nice way (set margin sizes, alignment, etc) rather than use something like Pillow to put together the contents of the layout, which is pretty clunky (lots of hardcoding (x,y) coords, etc).

Is th开发者_开发问答ere any library/language out there that can help me? I've considered rendering an actual webpage and programmatically converting it to PNG but that requires launching something like selenium and a Chromium driver, which I'd rather not do.

0

精彩评论

暂无评论...
验证码 换一张
取 消