-
Notifications
You must be signed in to change notification settings - Fork 2
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
Support simplified z-axis #26
Comments
@dankamongmen, if I remember correctly (TMT), you where one amongst those raising interesting in having the ability to not just draw text above text, but also below. As I said, I generally dislike the idea of introducing an arbitrary z-axis due to its implied complexity on the TE side, I wanted to provide something similar, yet much simpler. Would you (in the context of notcurses and friends) be fine with above/below text for images, or would you want to need more than that? |
In case you're looking for other ideas for this, my plan for mixed text/image layering in Windows Terminal was to add support for DEC's overstrike mode (?20), from the VK100. Architecturally there would still just be two layers - the text layer, and an image layer (with transparency). Regular text goes to the text layer, sixel images go to the image layer, and overstrike text is also written to the image layer. That gives you the ability to layer text over images over text as many times as you want, because the sixel and overstrike operations write directly to the image layer, merging with whatever is already there. And when you want to clear a cell, you just write out regular text, which will erase the image layer above it (exactly as it already works with sixel). The only limitation I can see with this approach is that you can't update layers independently of each other. But if an application really needed to do that, they could manage the layering themselves, and repaint the cell from the bottom up. And if you're concerned that would causing flickering, you can always implement double buffering using the paging APIs, and/or Obviously you're building a brand new image protocol here, so I'm not suggesting you follow this exact approach. But my point is that a simple two-layer architecture of images over text should give apps everything they need, as long as you also have a mechanism for writing text to the image layer. And any TEs that already supports sixel correctly should be able to support something like this without any changes to their architecture. |
An arbitrary Z-axis like Kitty would probably be overkill, especially because it puts a high burden on terminal authors that do not have a 3D API like OpenGL for rendering.
But reducing it to the minimal useful set should get the most out of it.
For maximum compatibility with existing VT sequences, any screen buffer mutating VT sequence that affects text, will also affect image fragments. If a column is moved, its image fragment (regardless of z-axis) will be moved, too.
The text was updated successfully, but these errors were encountered: