![]() |
#1 |
Member
![]() Posts: 22
Karma: 10
Join Date: Apr 2019
Device: Kobo Aura HD
|
Graphics from go on the kobo?
Hi,
I'd like to write an application (a browser for the gemini protocol) for the kobo in go, but the only way I have found to draw to the screen from a go program is through fbink (which is great but a little limited for what I'd like). Is there some other way to draw to the screen/get touchscreen events from a go program? Thanks! |
![]() |
![]() |
![]() |
#2 |
BLAM!
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 13,506
Karma: 26047190
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW, PW2, PW5; Kobo H2O, Forma, Elipsa, Sage, C2E
|
That'd be a no
![]() Fair warning in advance: Whatever you go with, input is going to be a major PITA. There's a reason almost nothing out there handles all the corner-cases properly, except for the stock Qt QPA, which we can't use, and Plato. KOReader is a close second, and that mainly because it forgoes hardware rotation handling (and what little it deals with on that front is relegated to FBInk via fbdepth), which avoids a nice chunk of the potential issues. (Purely coincidental example: https://github.com/llandsmeer/inkvt/pull/14) Out of curiosity, what's the hangup with FBInk? Last edited by NiLuJe; 11-11-2020 at 06:56 PM. |
![]() |
![]() |
Advert | |
|
![]() |
#3 |
Guru
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 875
Karma: 2676800
Join Date: Aug 2008
Location: Taranaki - NZ
Device: Kobo Aura H2O, Kobo Forma
|
I did a bit of exploratory work with touch input in Go a while ago. You can find it here: go-kobo-input. I also created an experimental on-screen keyboard as well, which can be found at go-osk.
The above probably still has some potential, if anyone wants to dust off the code. The input code probably needs to handle device specific rotation/mirroring handling though, as at the time, I was testing it with my old H2O. |
![]() |
![]() |
![]() |
#4 | |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 2,801
Karma: 6990707
Join Date: May 2016
Location: Ontario, Canada
Device: Kobo Mini, Aura Edition 2 v1, Clara HD
|
Quote:
If the issue is that you want more sophisticated text layout and rendering, note that you'll still need to deal with it no matter what you use (unless you're using a GUI toolkit with support for it, or embedding a minimal browser engine to do the rendering for you). Personally, I'd use Pango/Cairo, but Skia is another option. |
|
![]() |
![]() |
![]() |
#5 | |
Member
![]() Posts: 22
Karma: 10
Join Date: Apr 2019
Device: Kobo Aura HD
|
Quote:
|
|
![]() |
![]() |
Advert | |
|
![]() |
#6 | |
Guru
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 875
Karma: 2676800
Join Date: Aug 2008
Location: Taranaki - NZ
Device: Kobo Aura H2O, Kobo Forma
|
Quote:
go-fbink-v2 for example has a convenience "PrintRBGA" function, which displays an image.RGBA. You could use a library like gg to draw to an image.RGBA, then display it with "PrintRBGA" One of these days, it would be cool to have a pure Go solution for printing to screen, but that isn't today... |
|
![]() |
![]() |
![]() |
#7 | |
Member
![]() Posts: 22
Karma: 10
Join Date: Apr 2019
Device: Kobo Aura HD
|
Quote:
|
|
![]() |
![]() |
![]() |
#8 |
BLAM!
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 13,506
Karma: 26047190
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW, PW2, PW5; Kobo H2O, Forma, Elipsa, Sage, C2E
|
Yeah, the idea was to keep things to what I'm interested in first and foremost (i.e., messing with the mxcfb quirks), and what I'm halfway decent at second, which most decidedly is NOT maths and drawing primitives ;p.
So the current stance is: bake your pixmap using tools written by people who actually know what they're doing, and *then* feed it to fbink_print_raw_data ^^. |
![]() |
![]() |
![]() |
#9 | |
Member
![]() Posts: 22
Karma: 10
Join Date: Apr 2019
Device: Kobo Aura HD
|
Quote:
|
|
![]() |
![]() |
![]() |
#10 |
Guru
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 875
Karma: 2676800
Join Date: Aug 2008
Location: Taranaki - NZ
Device: Kobo Aura H2O, Kobo Forma
|
|
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Any way to display custom graphics on the Kobo Wifi? | KevinShort | Kobo Developer's Corner | 1 | 10-13-2012 03:57 PM |
Walking Dead graphics novels come to Kobo (and are non-agency!) | scrapking | Kobo Tablets | 9 | 03-29-2012 06:50 AM |
Kobo & inline graphics | Slope | Kobo Reader | 7 | 02-21-2011 12:25 PM |
graphics glitches - new for me | alexxx | Calibre | 7 | 12-16-2010 04:21 AM |
Computer Graphics Novel for $1.99 | roller_coaster | Deals and Resources (No Self-Promotion or Affiliate Links) | 2 | 03-17-2010 11:15 AM |