NiLuJe / FBInk

FrameBuffer eInker, a small tool & library to print text & images to an eInk Linux framebuffer

Home Page:https://www.mobileread.com/forums/showthread.php?t=299110

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

drawing many elements in a single refresh

frostschutz opened this issue · comments

Is it possible to add an option to fbink that will just draw to the framebuffer, without telling the screen to actually update?

Use case example, a weather display as shown in this thread:

https://www.mobileread.com/forums/showthread.php?t=194376

This displays a lot of info on a single page. Five days of weather forecast, each with a day name (today, tomorrow, friday, saturday, sunday), weather summary (partly sunny, showers likely, mostly sunny), a weather icon, high and low temperatures (each with high and low and °C / °F labels), the update time, some lines as background elements...

If I were to script a weather display using the fbink CLI utility that would mean 50+ calls to fbink with just as many refreshes to the screen. I'd like to skip all of those and follow up with a single full screen refresh.

This is probably the kind of thing where using the API would make sense to avoid repeating the init overhead (ioctl/mmap), but, regardless, it definitely makes sense, and is trivial to implement, so, yep! :)

Took the opportunity to fiddle with the manual refresh calls, passing an empty region (0,0,0,0 via the API, or only specifying wfm via the CLI) will now do a full-screen refresh (instead of shouting at you in the CLI, or getting discarded at runtime via the API).

That's splendid, thank you.