Skip to content

Drawing shapes requires degrees mode #33

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
anderjef opened this issue Apr 11, 2023 · 0 comments · Fixed by #44
Closed

Drawing shapes requires degrees mode #33

anderjef opened this issue Apr 11, 2023 · 0 comments · Fixed by #44

Comments

@anderjef
Copy link

Using the dot or circle functions while in radians mode appears to freeze the program for a number of seconds as it draws small lines for dot (instead of a dot) and heads out to a point and back for circle (instead of a circle or any regular polygon) before continuing to run the rest of the program. Using a Circuit Playground Bluefruit with TFT Gizmo.

Code to reproduce:

import board
import busio
import displayio
import adafruit_turtle

displayio.release_displays()
spi = busio.SPI(board.SCL, MOSI=board.SDA)
display_bus = displayio.FourWire(spi, command=board.TX, chip_select=board.RX)
display = ST7789(display_bus, width=240, height=240, rowstart=80, backlight_pin=board.A3, rotation=180)
turtle = adafruit_turtle.turtle(display)

turtle.radians()
turtle.pendown()
turtle.dot(10)
turtle.circle(50)

The workaround is to reset mode with turtle.degrees() before attempting to call either dot or circle.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant