pylcdsysinfo icon indicating copy to clipboard operation
pylcdsysinfo copied to clipboard

Manual drawing

Open MrBrax opened this issue 7 years ago • 7 comments

I guess this repo is pretty dead and @dangardner doesn't seem active, but i have ported the manual drawing (pixel by pixel, rectangles etc) functions from C# and they work without problems. If there's any demand for it i can upload the code somewhere.

MrBrax avatar Jul 07 '17 08:07 MrBrax

@MrBrax I would love to see the code! I took a quick look at https://github.com/MrBrax?tab=repositories but didn't see it? Could you share somewhere (ideally a fork of this repo, or email works too)? No hurry, I'd love to experiment with it some time.

clach04 avatar Oct 17 '18 03:10 clach04

I have uploaded it here, forgot about forks: https://github.com/MrBrax/pylcdsysinfo

It's not very modular however, i think there's some import issues unless you have all the names correct. I put everything in a separate file.

Still looking for a screen replacement, but nobody else seems to make an interactive screen like this.

MrBrax avatar Oct 17 '18 07:10 MrBrax

@MrBrax I finally was able to make time to play with this. Thanks again for making your code available 👍

I hit some problems, essentially minor but I was able to get the 3D cube demo working. Nice job 💯

I had to make a minor change to allow it to run, I'm tracking this in a branch https://github.com/clach04/pylcdsysinfo/tree/advanced_draw_wip

I can NOT run the pong demo as it appears to rely on a font that I do not have (and a google found no hits). The error is loading a font with the filename fonts/vcr_osd_mono_regular_20.xml, again I'm not sure what this is. Scanning through the code it looks like there may also be a need for some additional PNG file(s).

I know it has been a while, do you still have those to hand to share?

clach04 avatar May 18 '19 22:05 clach04

I suspect the font (XML and PNGs) are generated some how from https://www.dafont.com/vcr-osd-mono.font

clach04 avatar May 18 '19 22:05 clach04

I suspect the font (XML and PNGs) are generated some how from https://www.dafont.com/vcr-osd-mono.font

They are generated by FontBuilder

MrBrax avatar May 21 '19 12:05 MrBrax

Thanks @MrBrax I have a few more commits at https://github.com/clach04/pylcdsysinfo/commits/advanced_draw_wip with some more examples.

I think performance could be boosted by removing the PixelAccess class usage and replacing it with Image.convert()/tostring() - I've not had chance to try that yet.

clach04 avatar May 30 '19 06:05 clach04

I suspect the font (XML and PNGs) are generated some how from https://www.dafont.com/vcr-osd-mono.font

They are generated by FontBuilder

That worked great. I suspect SFont http://www.linux-games.com/sfont/ could be used to generate a similar XML file so that it could be generated dynamically. It's definitely possible to using ImageDraw from PIL too (but performance on that is not optimal at the moment).

The font is now part of the demo.

clach04 avatar May 30 '19 06:05 clach04