Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

scrolling planes ought scroll up their bound planes #1883

Closed
dankamongmen opened this issue Jul 4, 2021 · 9 comments
Closed

scrolling planes ought scroll up their bound planes #1883

dankamongmen opened this issue Jul 4, 2021 · 9 comments
Assignees
Labels
documentation Improvements or additions to documentation enhancement New feature or request
Milestone

Comments

@dankamongmen
Copy link
Owner

If a plane is scrolling, and it has subplanes, those subplanes ought scroll along with it. This is particularly important for the scrolling-standard-plane case. Right now, this is necessary to properly draw a sprixel in notcurses-info that scrolls up with the other output, and proving out this concept is central to the whole idea.

@dankamongmen dankamongmen added documentation Improvements or additions to documentation enhancement New feature or request labels Jul 4, 2021
@dankamongmen dankamongmen added this to the 3.0.0 milestone Jul 4, 2021
@dankamongmen dankamongmen self-assigned this Jul 4, 2021
@dankamongmen
Copy link
Owner Author

note that the rendering engine will need to know about screen scrolling, or else it's going to redraw a bunch of stuff (the entire screen, effectively, since it'll think everything's one line off), massively hurting performance.

@dankamongmen
Copy link
Owner Author

good news, everyone! i figured it all out while on a walk. i'll write it up in a bit, gotta hop for work.

@dankamongmen
Copy link
Owner Author

#1853 describes my plans, RFC

@dankamongmen
Copy link
Owner Author

be sure we observe NCPLANE_OPTION_FIXED, introduced in #1909

@dankamongmen
Copy link
Owner Author

ok, so what happens when we scroll a bound plane partially or entirely off the plane to which it is bound?

i'm inclined to think it ought work "like the real world" -- the subplane would scroll up until it is entirely distinct from the supraplane, at which point further scrolling would no longer move it. essentially, the rule becomes "when a plane is scrolling, subplanes intersecting it scroll along with it." i think that's reasonable. we do not destroy the plane once it's scrolled off or anything -- that's still up to the user.

properly doing this will require the ability to draw partial bitmaps. this need is evident even in notcurses-info: when the logo scrolls with the text, it can gradually scroll off the top of the screen. this is handled by the terminal normally, but we'll need deal with it explicitly. in general, this would solve #1539 as well. so maybe we ought attack #1539 as a prerequisite for this functionality.

@dankamongmen
Copy link
Owner Author

very promising: the first attempt does indeed fix notcurses-info when used at the bottom of the screen, which did not work before. unfortunately, it breaks the case where it's run at the top, which did work =].

@dankamongmen
Copy link
Owner Author

YAY the logo is now always correctly placed!!!!

@dankamongmen
Copy link
Owner Author

i am all that is man, baby!

2021-07-18-163153_887x1057_scrot

@dankamongmen
Copy link
Owner Author

hrmm we can get this notcurses-info fix independently of the scrolling change, though...it's just a matter of displaying the logo after the rest. hrmm.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant