09-04-2018, 02:15 PM | #61 |
curly᷂͓̫̙᷊̥̮̾ͯͤͭͬͦͨ ʎʌɹnɔ
Posts: 3,008
Karma: 50506927
Join Date: Dec 2010
Location: ♁ ᴺ₄₅°₃₀' ᵂ₇₃°₃₇' ±₆₀"
Device: K3₃.₄.₃ PW3&4₅.₁₃.₃
|
overlay
@NiLuJe, I am just playing with the new -o switch, is this the expected behaviour?
Code:
[root@kindle us]# fbink -c -B gray2 . #only to create a background [FBInk] Variable fb info: 600x800, 4bpp @ rotation: 0 (Upright, 0°) [FBInk] Fontsize set to 16x16 (IBM base glyph size: 8x8) [FBInk] Line length: 37 cols, Page size: 50 rows [FBInk] Fixed fb info: ID is "eink_fb", length of fb mem: 483328 bytes & line length: 300 bytes [FBInk] Enabled Legacy einkfb Kindle quirks [FBInk] Kernel's HZ value appears to be 100 [FBInk] Pen colors set to #000000 -> #FFFFFF for the foreground and #222222 -> #DDDDDD for the background Printing string '.' @ column 0 + 0px, row 0 + 0px (overlay: false, inverted: false, flashing: false, centered: false, left padded: false, clear screen: true, font: 0, font scaling: x0) [root@kindle us]# fbink -mM -S 20 -o O [FBInk] Variable fb info: 600x800, 4bpp @ rotation: 0 (Upright, 0°) [FBInk] Fontsize set to 160x160 (IBM base glyph size: 8x8) [FBInk] Line length: 3 cols, Page size: 5 rows [FBInk] Fixed fb info: ID is "eink_fb", length of fb mem: 483328 bytes & line length: 300 bytes [FBInk] Enabled Legacy einkfb Kindle quirks [FBInk] Kernel's HZ value appears to be 100 [FBInk] Pen colors set to #000000 -> #FFFFFF for the foreground and #FFFFFF -> #000000 for the background Printing string 'O' @ column 0 + 0px, row 0 + 0px (overlay: true, inverted: false, flashing: false, centered: true, left padded: false, clear screen: false, font: 0, font scaling: x20) Code:
[root@kindle us]# fbink -c -B gray2 . #only to create a background [FBInk] Variable fb info: 600x800, 4bpp @ rotation: 0 (Upright, 0°) [FBInk] Fontsize set to 16x16 (IBM base glyph size: 8x8) [FBInk] Line length: 37 cols, Page size: 50 rows [FBInk] Fixed fb info: ID is "eink_fb", length of fb mem: 483328 bytes & line length: 300 bytes [FBInk] Enabled Legacy einkfb Kindle quirks [FBInk] Kernel's HZ value appears to be 100 [FBInk] Pen colors set to #000000 -> #FFFFFF for the foreground and #222222 -> #DDDDDD for the background Printing string '.' @ column 0 + 0px, row 0 + 0px (overlay: false, inverted: false, flashing: false, centered: false, left padded: false, clear screen: true, font: 0, font scaling: x0) [root@kindle us]# fbink -F block -o -S 4 ABCDEFG [FBInk] Variable fb info: 600x800, 4bpp @ rotation: 0 (Upright, 0°) [FBInk] Fontsize set to 128x128 (BLOCK base glyph size: 32x32) [FBInk] Line length: 4 cols, Page size: 6 rows [FBInk] Fixed fb info: ID is "eink_fb", length of fb mem: 483328 bytes & line length: 300 bytes [FBInk] Enabled Legacy einkfb Kindle quirks [FBInk] Kernel's HZ value appears to be 100 [FBInk] Pen colors set to #000000 -> #FFFFFF for the foreground and #FFFFFF -> #000000 for the background Printing string 'ABCDEFG' @ column 0 + 0px, row 0 + 0px (overlay: true, inverted: false, flashing: false, centered: false, left padded: false, clear screen: false, font: 7, font scaling: x4) [EDIT] Also, would be nice to be able to just clear the screen fbink -c or create a background fbink -c -B gray2 and not have to specify a string. Last edited by PoP; 09-04-2018 at 02:35 PM. Reason: EDIT |
09-04-2018, 02:35 PM | #62 |
BLAM!
Posts: 13,497
Karma: 26047188
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW, PW2, PW5; Kobo H2O, Forma, Elipsa, Sage, C2E
|
I may have fucked it up on 4bpp devices ^^.
EDIT: Yep, that's a 4bpp-specific issue. I'll see what I can do . EDIT²: It's still honoring fg/bg pen color for anything not glyphs, that's what the not terribly clear mention in the help message meant. i.e., fbink -F block -o -S 4 ABCDEFG -B gray2 does what you wanted . EDIT³: That sounds sensible, but it's a tiny bit annoying to actually make happen ;p. (And it'd have to be a different flag than -c). (FWIW, for a blank line/page, ' ' (i.e., a single space) works, while '' will get you shouted at ) Last edited by NiLuJe; 09-04-2018 at 03:04 PM. |
Advert | |
|
09-04-2018, 03:03 PM | #63 |
BLAM!
Posts: 13,497
Karma: 26047188
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW, PW2, PW5; Kobo H2O, Forma, Elipsa, Sage, C2E
|
|
09-04-2018, 03:04 PM | #64 | |
curly᷂͓̫̙᷊̥̮̾ͯͤͭͬͦͨ ʎʌɹnɔ
Posts: 3,008
Karma: 50506927
Join Date: Dec 2010
Location: ♁ ᴺ₄₅°₃₀' ᵂ₇₃°₃₇' ±₆₀"
Device: K3₃.₄.₃ PW3&4₅.₁₃.₃
|
inline
Quote:
Last edited by PoP; 09-04-2018 at 03:09 PM. Reason: ' ' |
|
09-04-2018, 03:06 PM | #65 | |
curly᷂͓̫̙᷊̥̮̾ͯͤͭͬͦͨ ʎʌɹnɔ
Posts: 3,008
Karma: 50506927
Join Date: Dec 2010
Location: ♁ ᴺ₄₅°₃₀' ᵂ₇₃°₃₇' ±₆₀"
Device: K3₃.₄.₃ PW3&4₅.₁₃.₃
|
Quote:
|
|
Advert | |
|
09-04-2018, 03:06 PM | #66 |
Grand Sorcerer
Posts: 5,528
Karma: 100606001
Join Date: Apr 2011
Device: pb360
|
Which current devices have other than 4bpp?
|
09-04-2018, 03:06 PM | #67 |
BLAM!
Posts: 13,497
Karma: 26047188
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW, PW2, PW5; Kobo H2O, Forma, Elipsa, Sage, C2E
|
@PoP: The extra padding is just that, extra padding, it's another bit of code than the font rendering one, so it's simply using the set fg/bg pen colors (i.e., it's not honoring is_overlay at all).
That's mostly a byproduct of the fact that I need is_overlay enabled during font rendering for progress bar, but not during the rendering of the progress bar themselves (which happens to be using the same rectangle filling function as the padding ). |
09-04-2018, 03:07 PM | #68 |
BLAM!
Posts: 13,497
Karma: 26047188
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW, PW2, PW5; Kobo H2O, Forma, Elipsa, Sage, C2E
|
@j.p.s: The K4 is the first 8bpp devices, everything since also is.
Meaning the only 4bpp devices are the K2, K3, DX & DXG. The K1 might have been using something even nastier, but I've never had one . |
09-04-2018, 05:38 PM | #69 |
BLAM!
Posts: 13,497
Karma: 26047188
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW, PW2, PW5; Kobo H2O, Forma, Elipsa, Sage, C2E
|
@PoP: Yeah, now that I have a K3 plugged in, indeed, can't slice on the K3 busybox version, but I seem to remember it working on newer models.
Which is likely, given that it's not a bb limitation, as it works in my own bb build (which you could always resort to, I guess ;p. Which would logically lead to the next step of simply using ZSH ;p). Code:
[root@kindle root]# BLAH="ABCD" [root@kindle root]# echo ${BLAH:1:1} -sh: syntax error: Bad substitution [root@kindle root]# /mnt/us/usbnet/bin/busybox ash [root@kindle root]# BLAH="ABCD" [root@kindle root]# echo ${BLAH:1:1} B |
09-04-2018, 10:14 PM | #70 |
curly᷂͓̫̙᷊̥̮̾ͯͤͭͬͦͨ ʎʌɹnɔ
Posts: 3,008
Karma: 50506927
Join Date: Dec 2010
Location: ♁ ᴺ₄₅°₃₀' ᵂ₇₃°₃₇' ±₆₀"
Device: K3₃.₄.₃ PW3&4₅.₁₃.₃
|
Sure, since I already rely on usbnet for ssh, might as well rely on usbnet's bb:
Code:
[root@kindle root]# PATH=/mnt/us/usbnet/bin:$PATH [root@kindle root]# busybox BusyBox v1.29.2 (2018-08-22 03:16:32 CEST) multi-call binary. BusyBox is copyrighted by many authors between 1998-2015. Licensed under GPLv2. See source distribution for detailed copyright notices. Usage: busybox [function [arguments]...] or: busybox --list or: function [arguments]... BusyBox is a multi-call binary that combines many common Unix utilities into a single executable. Most people will create a link to busybox for each function they wish to use and BusyBox will act like whatever it was invoked as. Currently defined functions: [, [[, ash, bash, bb, bbsh, bunzip2, cttyhack, ftpd, httpd, inetd, login, mkdir, sh, start-stop-daemon, telnetd [root@kindle root]# I'll rewrite 'box' (...in time) with ${BLAH:1:1}. thanks. [EDIT] Ahh, I see, alternately don't touch PATH, just invoke busybox ash ./box 0 0 4 string -c Last edited by PoP; 09-04-2018 at 10:27 PM. |
09-05-2018, 12:49 AM | #71 |
BLAM!
Posts: 13,497
Karma: 26047188
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW, PW2, PW5; Kobo H2O, Forma, Elipsa, Sage, C2E
|
@PoP: Hmm, on my end, USBNet's busybox isn't in my $PATH
Code:
┌─(ROOT@kindle:pts/0)───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────(~)─┐ └─(0.29:37%:15:27:100%:#)── which busybox ──(Sun, Sep 25)─┘ /bin/busybox (Don't mind my poor K3 clock stuck on a random 2016 day ) (And, yeah, that's on purpose NOT to screw with the system's reliance on its own potentially-mystically-patched BB version ). ---- Thinking back about the overlay/background thing, you're right: with overlay enabled, it explicitly states "no bg pixels are drawn", and those padding rectangles are definitely background, so, yeah, they shouldn't be drawn at all . I'll fix that. Last edited by NiLuJe; 09-05-2018 at 12:52 AM. |
09-05-2018, 08:13 AM | #72 | |
curly᷂͓̫̙᷊̥̮̾ͯͤͭͬͦͨ ʎʌɹnɔ
Posts: 3,008
Karma: 50506927
Join Date: Dec 2010
Location: ♁ ᴺ₄₅°₃₀' ᵂ₇₃°₃₇' ±₆₀"
Device: K3₃.₄.₃ PW3&4₅.₁₃.₃
|
Quote:
While you are at it an other mode of overly I was thinking about could be to draw the foreground pixels in the pen color (instead of background inverse) and leave the background pixels unchanged. Something like writing with transparent text (no political intent, solely to illustrate the effect): Spoiler:
...Just an idea. |
|
09-05-2018, 10:36 AM | #73 |
BLAM!
Posts: 13,497
Karma: 26047188
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW, PW2, PW5; Kobo H2O, Forma, Elipsa, Sage, C2E
|
Yeah, just skip background without tweaking pen color, that should be easy .
|
09-05-2018, 06:52 PM | #74 |
BLAM!
Posts: 13,497
Karma: 26047188
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW, PW2, PW5; Kobo H2O, Forma, Elipsa, Sage, C2E
|
Released v1.6.1 .
With the aforementioned fixes to overlay/progressbars on 4bpp Kindles, as well as the backgroundless mode that just came up . |
09-05-2018, 09:18 PM | #75 | |
curly᷂͓̫̙᷊̥̮̾ͯͤͭͬͦͨ ʎʌɹnɔ
Posts: 3,008
Karma: 50506927
Join Date: Dec 2010
Location: ♁ ᴺ₄₅°₃₀' ᵂ₇₃°₃₇' ±₆₀"
Device: K3₃.₄.₃ PW3&4₅.₁₃.₃
|
'single space'
Quote:
Code:
[root@kindle root]# cd /mnt/us [root@kindle us]# eips -p [root@kindle us]# ./screenshot [root@kindle us]# fbink -c ' ' [FBInk] Variable fb info: 600x800, 4bpp @ rotation: 0 (Upright, 0°) [FBInk] Fontsize set to 16x16 (IBM base glyph size: 8x8) [FBInk] Line length: 37 cols, Page size: 50 rows [FBInk] Fixed fb info: ID is "eink_fb", length of fb mem: 483328 bytes & line length: 300 bytes [FBInk] Enabled Legacy einkfb Kindle quirks [FBInk] Kernel's HZ value appears to be 100 [FBInk] Pen colors set to #000000 -> #FFFFFF for the foreground and #FFFFFF -> #000000 for the background Printing string ' ' @ column 0 + 0px, row 0 + 0px (overlay: false, backgroundless: false, inverted: false, flashing: false, centered: false, left padded: false, clear screen: true, font: 0, font scaling: x0) [root@kindle us]# ./screenshot [root@kindle us]# Though everything appears to work fine (and the fb has obviously been cleared), the screen still shows the first pattern screenshot my K3! Is there some kind of a "write update" missing? |
|
Tags |
eips, fbink |
Thread Tools | Search this Thread |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
FBInk: A small tool/library to print crap on your screen! | NiLuJe | Kobo Developer's Corner | 306 | 10-17-2024 01:00 AM |
Small print | Broadback | Conversion | 12 | 12-12-2011 03:31 PM |
Small Tool to change book order (PRS-x50) | goaspy | Sony Reader | 113 | 10-14-2011 04:28 PM |
small print | breezeman | Introduce Yourself | 13 | 07-03-2011 10:02 AM |