1

I can't seem to get the write function to be rotated. I tried the tilt function. Is there something I'm doing wrong? I'm thinking it would be something like this:

e.g. If I set some variable to 180 it would turn the text upside down

edit: as requested here is my attempt, I think I'm using tilt wrong, not sure.

the aim is to write the text at a desired angle (in this case 180, or upside down)

tilt(180)
write('M', move=False, align="left", font=("Arial", 15, "bold"))

still writes it in regular, upright form, as shown here:

failed attempt

bluesriff
  • 73
  • 5
  • 3
    *I tried the tilt function*. Post your attempts, failures and expected output. In that way you can make your question on-topic for SO (else it will become a [gimmetehcodez] question) – Bhargav Rao Aug 29 '15 at 12:49
  • Hey, take a look at [ask]. It will increase your chances of people answering your question! – xrisk Aug 29 '15 at 12:51
  • @bhargavrao I've updated the question – bluesriff Aug 29 '15 at 12:55
  • 1
    Good that you have updated it. But post an [MCVE]. Include some more bits of code (Dont post the complete code dump). – Bhargav Rao Aug 29 '15 at 12:57
  • 3
    As far as I know, `turtle` doesn't have a way of rotating text rendered with the `write()` method. The `tilt()` method only affects the angle of the turtle. – PM 2Ring Aug 29 '15 at 13:05
  • 1
    Related and possible duplicate [how to rotate text in python's turtle graphics](http://stackoverflow.com/questions/4469125/how-to-rotate-text-in-pythons-turtle-graphics) – Bhargav Rao Aug 29 '15 at 13:06
  • @BhargavRao Not a duplicate. I checked that question. It involved an outdated version of turtle/python. It also referred to a function called 'rotate', which I couldn't find in the turtle documentation, and I believe that it may have been the predecessor to 'tilt'. – bluesriff Aug 29 '15 at 13:10
  • 1
    What version do you have, bluesriff? I.e., what does `python -c "import turtle;print(turtle.TK.TkVersion)"` print? – PM 2Ring Aug 29 '15 at 13:15
  • Interesting that python2 itself is based on 8.6 – Bhargav Rao Aug 29 '15 at 13:19
  • @BhargavRao: FWIW, I'm running Python 2.6.6, and my `turtle.TK.TkVersion` is 8.5. So I can't test this **new** `rotate()` method... – PM 2Ring Aug 29 '15 at 13:22
  • https://bugs.python.org/issue10531 -> for 3.6+ this issue hasn't been solved. Glancing through the bug tracker I didn't see a bug logged against 2.6/2.7, but I doubt that it works over there either. Then again, I didn't search all that closely. – theB Aug 29 '15 at 14:32
  • 1
    Possible duplicate of [how to rotate text in python's turtle graphics](https://stackoverflow.com/questions/4469125/how-to-rotate-text-in-pythons-turtle-graphics) – Don Kirkby Sep 16 '17 at 15:43

0 Answers0