-
Notifications
You must be signed in to change notification settings - Fork 11
multiple improvements : memory, functionality #18
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
Conversation
thanks! if you can lint it, then we will test and merge :) |
@ladyada : done ! all checks have passed. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is great! I would just say to try to make it as much like the CPython library version https://docs.python.org/3/library/turtle.html as possible. I made one suggestion in that regard, though there may be others. I'm not that familiar with the original API, so for instance I see that changeturtle()
is not in the original API. But maybe there is no equivalent for that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good to me! I tried some functions but not all, and it works fine.
@Marius-450 Maybe we will make this 2.0.0, since there are so many changes?
@ladyada any further comments?
I have no objection making this 2.0.0. do I need to change something for that ? |
No, we'll make a release, no problem. But I just tried setting
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
will wait for comments re color changing
try |
OK, thanks, that's it, I'm too quick to try a property, and all I did was smash the method. :) |
Updating https://github.com/adafruit/Adafruit_CircuitPython_Pypixelbuf to 1.0.3 from 1.0.2: > build.yml: move pylint, black, and Sphinx installs to each repo; add description to 'actions-ci/install.sh' > Merge pull request adafruit/Adafruit_CircuitPython_Pypixelbuf#6 from jepler/no-re Updating https://github.com/adafruit/Adafruit_CircuitPython_turtle to 2.0.0 from 1.1.2: > Merge pull request adafruit/Adafruit_CircuitPython_turtle#18 from Marius-450/marius_improvements > build.yml: move pylint, black, and Sphinx installs to each repo; add description to 'actions-ci/install.sh' Updating https://github.com/adafruit/Adafruit_CircuitPython_Bundle/circuitpython_library_list.md to NA from NA: > Added the following libraries: Adafruit_CircuitPython_Wiznet5k
multiple improvements : memory, functionality + consistency with documentation
See this repo for the full changelog.
scale
parameter to scale the "canvas".set_bgpic()
to display a bitmap as background, using OnDiskBitmap. Addedchangeturtle()
to change the turtle shape via OnDiskBitmap or by passing a tilegrid object.pensize()
,speed()
,reset()
and some helpers likedistance()
ortowards()
circle()
, or improvingdot()
The only problematic change i saw while testing all the example is the default heading to 0. I changed 4 examples to work as intended, by only setting heading to 90 once. Everything else worked out of the box, just a little slower due to the default speed value.
I removed the debug logger, and what seemed irrelevant or useless : event-based functions, undo buffer ... any comment is welcome about those.
On a 240x240 display, a turtle object use around 30500 Bytes with this version, versus 37500 Bytes previously. Using
scale=2
the object use "only" 8900 Bytes of memory.