Python 成像,调整海龟图形窗口的大小
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/831894/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Python imaging, resize Turtle Graphics window
提问by TIMBERings
My image is too large for the turtle window. I had to enlarge the image because the text I need at each spot overlaps.
我的图像对于龟窗来说太大了。我不得不放大图像,因为我需要在每个位置的文本重叠。
How do I Resize the window in python?
如何在python中调整窗口大小?
回答by NobodyReally
It sounds like you have drawn an image, but it has gone outside the borders of the window, so therefore you need to make the window larger to see the entire image.
听起来您已经绘制了一个图像,但它已经超出了窗口的边界,因此您需要将窗口放大才能看到整个图像。
To resize the window:
要调整窗口大小:
setup( width = 200, height = 200, startx = None, starty = None)
设置(宽度 = 200,高度 = 200,startx = 无,starty = 无)
This will make your output window 200X200 (which may be too small for you so you'll need to make those numbers larger.)
这将使您的输出窗口为 200X200(这对您来说可能太小了,因此您需要将这些数字放大。)
Here is the URL where I found this information. TurtleDocs
这是我找到此信息的 URL。 海龟文档