gfx.scroll and linewrap font #1436
Replies: 3 comments
-
Posted at 2020-08-19 by @gfwilliams Hi! Generally on Espruino scrolling only works on offscreen buffers, but on Bangle.js it's a bit of a special case because as you note there's a bigger screen buffer than is displayed, and the display controller allows us to move the display window around within it - it makes scrolling super fast. The screen is 240x240 but the buffer is 240x320. As such you can only scroll vertically, and the notifications perform a bit of magic to allow them to be drawn on the extra 80 rows of the buffer while everything else still goes to the 'normal' 240 rows.
Draw operations are faster, there's no flicker, and you can read back data with getPixel. Also you can scroll horizontally.
No - the RAM was always there in the display, just not getting used. Since we can't read back from it, it can't be used for anything other than the display.
Afraid not - there is the code built into the notify library though. It would actually make a pretty useful module.
You mean Theoretically if you added a Bluetooth LE keyboard you could use the Terminal to actually write JS code as you might on the left-hand side of the IDE. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2020-08-19 by d3nd3-o0
How practically difficult would it be to connect a BLE keyboard to the bangle? Also, is there a way to draw on every 'frame' , how often am i supposed to be sending graphic updates? EDIT: found the flip function! and a flappy bird example ;) Why is the default unbuffered/direct if there are such benefits to double buffered? |
Beta Was this translation helpful? Give feedback.
-
Posted at 2020-08-20 by @gfwilliams
I don't think it's too hard, and I would have done it but the issue is finding an actual Bluetooth Low Energy keyboard.
Double buffered is less screen size, and the buffered examples (80x80,etc) use a bunch of RAM.
120Hz? I'm not sure, you'd have to look at the datasheet. Realistically you will never hit it though because the bandwidth to the display itself is too low. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Posted at 2020-08-19 by d3nd3-o0
I like the way that the notify app/module is able to scroll the screen. What are the limits of scrolling? Is scrolling possible because the 'graphic buffer' has more 'data space' than the display surface/screen requires for its size? I am a bangle user so answer can apply more to that, but the question is generic. What is the benefits of double buffered mode? Does using scrolling use more ram than not using scrolling?
Secondly, is there any library written to handle line-wrapping text, so that it doesn't go off-screen?
When is 'terminal' mode useful?
Beta Was this translation helpful? Give feedback.
All reactions