View Single Post
Old 08-12-2019, 10:31 AM   #2
NiLuJe
BLAM!
NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.
 
NiLuJe's Avatar
 
Posts: 13,477
Karma: 26012494
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW, PW2, PW5; Kobo H2O, Forma, Elipsa, Sage, C2E
Random comments about FBInk usage ahead .

You should be able to use fbink_refresh() (or fbink_cls(), if you need a blank screen), f.g., for a flashing full-screen refresh:

Code:
        fbink_cfg.is_flashing = True
        FBInk.fbink_refresh(fbfd, 0, 0, 0, 0, FBInk.HWD_PASSTHROUGH, fbink_cfg)
Same thing for fbink_print_ot():

Code:
        FBInk.fbink_add_ot_font("PxPlus_IBM_VGA8.ttf", FBInk.FNT_BOLD)
        fbink_ot_cfg = ffi.new("FBInkOTConfig *")
        fbink_ot_cfg.margins.top = 500
        fbink_ot_cfg.margins.bottom = 600
        fbink_ot_cfg.margins.left = 400
        fbink_ot_cfg.margins.right = 50
        fbink_ot_cfg.size_pt = 10.0
        fbink_ot_cfg.is_formatted = True
        FBInk.fbink_print_ot(fbfd, "**Wheeeee!**", fbink_ot_cfg, fbink_cfg, ffi.NULL)
        FBInk.fbink_free_ot_fonts()
(Tested at the end of the try: block in the binding's hello.py example, which explains the indentation & variable names ).

----

In the same vein, I'm fairly sure you can send ioctl in straight Python, instead of relying on a C helper for the frontlight (I'd, err, forgotten you were doing Python when I originally mentioned a C helper ;p).

Last edited by NiLuJe; 08-12-2019 at 10:44 AM.
NiLuJe is offline   Reply With Quote