Desktop graphics - or “skinned” windows

℡╲_俬逩灬. 提交于 2019-12-19 04:09:53

问题


I'm looking for a way to draw animations right on the desktop. No window frames and with transparent background.

I'm using Python in windows XP for it, but it doesn't have to be cross platform, although it'd be a nice bonus.

Does anyone know about a python library that can do this?


回答1:


If you want a frameless window, there are several options. For example, pygame can be initialized with the following flag:

pygame.init()
screen = pygame.display.set_mode(size=(640,480), pygame.NOFRAME)

Your question doesn't make it clear if you're looking for a transparent surface, though.




回答2:


I found that wxPython was able to do this after all. You always find things when you've stopped looking for some reason. I stumbled upon the shaped window setting when I was looking through the demo file for wxPython.

I haven't been able to find any good tutorials for it on the net, but the code in the demo should be enough to get started. It should even be platform independent.

wxPython official site

wxPython downloads (including demo files)



来源:https://stackoverflow.com/questions/396791/desktop-graphics-or-skinned-windows

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!