简体   繁体   中英

Create transparent square in python turtle

Using python turtle, I have made a code that connects points based on weather (high = X, low = Y) and the line between the points shows the weather that day (yellow = sunny). I previously tried to make the tail fade as the line continued. After asking people with more experience and scouring the web, I moved on from that option.

I then decided to try to create a transparent square that will overlay over the code periodically to create the same effect but I am having trouble finding how to do that. I need it to fade into the black background. Please let me know if anyone knows how to do this! Thanks!

Use the setfillopacity(50) function to make it transparent

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