QUERY · ISSUE
RFC modframebuf.c scrolling behaviour
enhancement
Currently framebuf_scroll does not clear the region of the display which is exposed by scrolling. While I appreciate that this behaviour is by design, I'd submit that it's seldom what is actually required.
An option would be good, perhaps via a colour arg:
- Behave as at present leaving exposed region unchanged.
- Fill with a colour.
Any thoughts, or reasons why the current behaviour has been chosen?
CANDIDATE · PULL REQUEST
extmod/framebuf: Add the xstep!=0 case to scroll()
Adds horizontal scrolling. Right now, I'm just leaving the margins
created by the scrolling as they were -- so they will repeat the
edge of the framebuf. This is fast, and the user can always fill
the margins with a fill_rect call.
There are two other alternatives:
- we can clear them ourselves, like with vertical scroll (perhaps we
want to have an extra argument specifying the color?) - we can wrap around -- this is a bit tricky, would require to either
do the scroll pixel by pixel, or create a buffer.