views:

295

answers:

1

I am using turtle graphics through Python. My image is too large for the turtle window. I had to enlarge the image because the text I need at each spot overlaps. I have a few ideas on how to make the image fit inside the window, but I can't get any of them to work.

  • Resize the window
  • Resize the text
  • Set bottom left and top right coordinates
+1  A: 

I have not ever used the turtle graphics module of python, and I'm not real clear on what you're wanting to accomplish, so...

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 you can try this:

setup( width = 200, height = 200, startx = None, starty = None)

This will make your output window 200X200 (which may be too small for you so you'll need to make those numbers larger.)

Here is the URL where I found this information. TurtleDocs

NobodyReally
Is there any way to change the text size in the write() procedure?
TIMBERings
In python 2.6 there appears to be a way to do that. turtle.write("Hello",move=False,align="right",font=("Arial",24,"normal")). I can't test this as I have 2.5.2 installed not 2.6. http://www.python.org/doc/2.6/library/turtle.htmlHope this helps
NobodyReally