简体   繁体   中英

Shape Transparency in Python graphics module

So the thing is, I need to make a shape transparent in python using the graphics module and not the tkinter module. Is there any method for that. And if there is I'd like to know how it is used. Thanks

If you are using John M Zelle's graphics library, it only supports rgb, not alpha (you can view the full source for graphics.py here )

You will see the source contains no alpha capacity.

This post may help you: python tkinter canvas 'transparent'

Since graphics.py is just an OOP wrapper around tkinter anyway, you should be able to apply alpha in the same way, however I have not tested this. You may be able to extend the graphics module simply to allow alpha.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM