nickmcintyre / ipycc

A Python package for creative coding in Jupyter
GNU Lesser General Public License v3.0
4 stars 1 forks source link

Turtle goto() should draw if pen down #2

Closed dkessner closed 1 year ago

dkessner commented 1 year ago

Hi Nick, thank you for your great work on this project, and for publishing it.

In standard Python turtle graphics, the goto() function will draw if the pen is down, something like this:

def goto(self, x, y):
    if self._pen_is_down:
        self._p5.line(self._x, self._y, x, y)
    self._x = x
    self._y = y
    self._render()
nickmcintyre commented 1 year ago

Thanks for the bug report @dkessner! I believe goto() and its aliases now work correctly as do setx() and sety().

The updated package is now on PyPI. Please let me know if you encounter other unexpected behavior.