mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-01-19 16:57:31 +01:00
[turtle] Fixed remanent images bug
We now erase the turtle before writing text. This way we can redraw it
on top of it, preventing overlapping and remanent images.
Those scripts are causing issues :
goto(-30,50)
write('coucou')
left(270)
goto(30,50)
write('oui')
-----------
up()
goto(-30,50)
write('coucou')
goto(30,50)
write('oui')
Change-Id: I01a6e5f8308937b5051165548c2046883da587d2
This commit is contained in:
@@ -176,8 +176,8 @@ void Turtle::setVisible(bool visible) {
|
||||
}
|
||||
|
||||
void Turtle::write(const char * string) {
|
||||
// To prevent overlapping between the text and the turtle, force redraw
|
||||
m_drawn = false;
|
||||
// We erase the turtle to redraw it on top of the text
|
||||
erase();
|
||||
MicroPython::ExecutionEnvironment::currentExecutionEnvironment()->displaySandbox();
|
||||
KDContext * ctx = KDIonContext::sharedContext();
|
||||
static constexpr KDCoordinate headOffsetLength = 6;
|
||||
|
||||
Reference in New Issue
Block a user