我如何去除python乌龟中的bgimage
我类似地导入了BG图像
screen = turtle.Screen()
#reference image
screen.bgpic("image.png")
,然后我制作了图形,但是我想删除BG图像,因此只保留BGColor,如果i screen.clear.clear()
,它可以清除我用Turtle绘制的一切。
I imported an bg image like so
screen = turtle.Screen()
#reference image
screen.bgpic("image.png")
then I made my graphic but I want to remove the bg image so only the bgcolor remains and if I screen.clear()
it clears everything I drew with turtle.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
根据文档,将
'nopic'
作为picname
参数,它将删除当前图像:'nopic'
token在询问bgpic()
如果没有背景图像集:Per the documentation, pass
'nopic'
as thepicname
argument and it will remove the current image:The
'nopic'
token is also returned when interrogatingbgpic()
if there is no background image set: