0

I am saving a drawing using getscreen, getcanvas, etc. However, getscreen() adds an intrusive stamp. How do I hide the stamp

tr = turtle.Turtle()
tr.color("red")
tr.forward(100)
tr.hideturtle()
ts = turtle.getscreen()
ts.getcanvas().postscript(file="tile.eps")

Result

I've tried visible=False, etc. to no avail.

KenS
  • 30,202
  • 3
  • 34
  • 51

2 Answers2

0

The stamp is coming from TkInter, not from turtle itself

enter image description here

turtle is very dependent on TkInter.

Try this answer for useful ideas: https://stackoverflow.com/a/65601889/7549483

ProfDFrancis
  • 8,816
  • 1
  • 17
  • 26
0

If I have understood correctly, the problem is that in the resulting image you can see a black turtle in the middle.

Then the proble is that you are using 2 turtles, the default turtle turtle and a second turtle you are creating with tr = turtle.Turtle(), this second one is the turtle you are hidding, but the default one is still visible.

If you only want to use one turtle, use the default one:

turtle.hideturtle()
turtle.color("red")
turtle.forward(100)
ts = turtle.getscreen()
ts.getcanvas().postscript(file="tile.eps")

Or if you want to use two, hide both:

turtle.hideturtle()

tr = turtle.Turtle()
tr.hideturtle()
tr.color("red")
tr.forward(100)
ts = turtle.getscreen()
ts.getcanvas().postscript(file="tile.eps")
Rodrigo Llanes
  • 613
  • 2
  • 10