Python图形模块中的Shape Transparency

时间:2016-03-23 03:23:29

标签: python object transparency shape

所以问题是,我需要使用图形模块而不是tkinter模块在python中使形状透明。有什么办法吗?如果有,我想知道它是如何使用的。感谢

1 个答案:

答案 0 :(得分:1)

如果您使用的是John M Zelle的图形库,它只支持rgb,而不支持alpha(您可以查看graphics.py here的完整来源)

您将看到源不包含alpha容量。

这篇文章可以帮到你: python tkinter canvas 'transparent'

因为无论如何,graphics.py只是tkinter的OOP包装器,你应该能够以相同的方式应用alpha,但是我还没有测试过。您可以简单地扩展图形模块以允许alpha。