Tufty 2350 can you rotate / invert the screen?

As the title says, on a Tufty 2350 can you rotate the screen 180 degrees?
I did have a look through the API documentation, if its in there I missed it.

With the Tufty on the lanyard I’d like the screen in the normal mode, so others can read it. But if I pick it up, flipped upside down to face me, I’d like to flip the screen with the V arrow key so I can read it without having to physically turn it 180 dgrees to read it.

You actually can! It’s a little extra code, but perfectly doable. While image objects can’t be rotated, 180 degrees specifically is possible, as you can achieve it by flipping once horizontally and once vertically, in either order.

So you’d do all your drawing to an image object you’d created, rather than to screen, then the last thing you’d do would be to use screen.blit() to blit it to the screen.

You can specify the dimensions of the destination, but if you specify negative dimensions the image will be flipped in that axis.

So to display right way up you’d use screen.blit(my_image, rect(0, 0, screen.width, screen.height) and to flip you’d use screen.blit(my_image, rect(0, 0, -screen.width, -screen.height). You don’t need to change x and y, it’ll still be positioned right.

1 Like

Ok, not what I was hoping for, but being doable still helps. I’ll save that for my last bit of tinkering / editing. ;)

Shouldn’t be hard to do after the fact - create an image called something like screen_temp at the start, do a find/replace to change everywhere you’ve written to screen and change it to screen_temp, then do the aforementioned blit at the end, just switching out positive or negative values based on your button.

Although it uses flips, the end result is a proper 180 degree rotation, so it should be ideal for what you’re doing.

1 Like