8000 Drawing shapes requires degrees mode · Issue #33 · adafruit/Adafruit_CircuitPython_turtle · GitHub
[go: up one dir, main page]

Skip to content
Drawing shapes requires degrees mode #33
Closed
@anderjef

Description

@anderjef

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0