-
-
Notifications
You must be signed in to change notification settings - Fork 114
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
use DECFRA to update glyphs underneath transparent graphic #1740
Comments
there's also
|
when you wish to selectively nuke from orbit |
it looks like this plays with |
Most interesting i still think is |
oooh DECCRA looks useful indeed, assuming it's actually widely implemented. with that said, it would be difficult for me to use it in my current model, except for sprixels without background glyphs, since everything else gets mixed down to a single layer during rendering. i could theoretically tag plane movements, and watch for interactions with other planes, and use DECCRA if there are none of the latter, but that's a fair amount of effort to avoid some glyph writes, especially if support is thin. for sixel, it could be useful indeed. @ThomasDickey's observation here points out that styling/colors aren't copied over, which indeed looks to be the case:
which is definitely the final nail in the coffin in terms of it being useful to me. the vast majority of non-bitmap bandwidth is going to styling escapes, not glyphs, so this wouldn't actually save me much bandwidth. and who knows whether it works on sixels? nuking rectangular regions from orbit remains desirable. |
@dknl has some useful comments back in #1619:
his analysis of performance (and why P2=0 would likely be a miss) corresponds to a reply from @ThomasDickey a few weeks back when i reported what i thought a bug in XTerm performance. |
He is wrong as much as the spec is concerned at least. Quote from the spec: There may have been buggy implementations though. - or at least it differs from my interpretation of the spec. See below.
Check https://vt100.net/docs/tp83/appendixb.html and search for "line attributes". Line attributes are those that apply to the whole line and not those in the cell level (such as SGR attributes) unless i am completely drunk (nothing is impossible). ;-) I hope this text is free of topys as i am writing from the phone :) P.s. VT >= 400 for those who care |
perhaps! your reading seems reasonable, but i am still no expert in such things. either way, rectangular copy just seems very difficult to fit to my implementation, except perhaps for bitmaps (when are rasterized as a plane, as opposed to glyphs, which are all rendered down to a single common frame first). when it comes to bitmaps, with Kitty i've got true moves, and with any new graphics protocol, i would hope for the same (and even with kitty's move, i can't use it very often due to other problems, see #1803 and #1395). but i've got big hopes for DEC[EF]RA! need to experiment. |
looks like it might be sufficient to check for |
Exactly, Mr.Robot. |
DECERA doesn't appear to erase sixels in at least XTerm =[ |
|
|
|
though, i was thinking about this, and it's all irrelevant. we don't go printing a ton of spaces atop sixels to erase them; we go printing whatever was in the damage buffer. otherwise, we'd just have to draw the latter for a total of two draws per cell.
that original dank, such a buzzkill! |
This sounds like a bug in xterm? Can it be fixed? |
does contour erase sixels with DECERA? i didn't test beyond XTerm. the documentation at vt100.net didn't seem to state explicitly one way or the other. like i noted later, i don't need DECERA in any case, since i changed things up two months back or so to simply reprint the cells underneath the sixel, which annihilates it while putting up the necessary backglyphs. so it doesn't buy me anything. i could possibly make use of DECFRA in the future, but i can't yet. using it with spaces, if those knocked out the sixel, would seem functionally equivalent to DECERA, so i'd just use that for that case. let me go take a look at the XTerm code surrounding DECFRA and see if there are any indications... |
if it was going to happen, it would presumably happen in |
|
sweet, my patch worked immediately. i'll send it on out. |
Of course it does (in contour). ED is erssing it all too without mentioning Sixel, doesn't it. Also, i am not sure the spec mentions that char writes are replacing image cells do they? |
@dankamongmen no intentions, up to this point at least. Simply because I'm not aware of anyone using them. If notcurses starts using them, I'll reconsider. (assuming there's consensus on how they should interact with sixels...) |
tmux can do, IIRC. I noticed that because I initially implemented them buggy. On the other hand are we currently talking about a chicken'and'egg problem. I think they are doing good, so I think they deserve to be implemented. (I am going to verify my claim as soon as I. At a computer). Cheers ;-) |
If I'm not mistaken, tmux only emits them when running on a VT420 level emulator, or newer (instead of e.g. checking for "Rectangular Editing" in the primary DA respone. If so, then adding only these escapes to foot wont be enough, since there are many other unsupported VT420 escapes. That said, I think we can still add them, if e.g. notcurses wants them. |
@dankamongmen btw, I tried your ncplayer + DECFRA example (from #1740 (comment)) in XTerm 370, and it seems it now erases the sixel:
|
yep =] i'm nick black =] |
🤣 aye, I'm aware of that. But:
... and I didn't see a conclusion being reached in hackerb9/vt340test#16. But, having I'll get started on an implementation for foot. |
Nice @dnkl , looking forward to it. (I also implement them and expose it also regardless of VT identification). WRT tmux we could file a ticket to also respect rectangular feature exposure through DA1 in tmux. |
Re. |
|
@christianparpart tmux recognizes the non-standard terminfo capability Note that it's a string capability (and not a boolean, as I first thought). See https://codeberg.org/dnkl/foot/commit/375441a99bb8a111c8a21d120e447063e49b34b9 |
Why does tmux keep inventing new terminfo entries. @dnkl please also advertise via
The ones I have not yet implemented but do consider useful (i.e. will do soonish):
IMHO useless ones (subjective):
You can find them all documented at: https://vt100.net/docs/vt510-rm/contents.html I think I should probably add |
i am currently only looking for |
I mentioned the Obviously, advertising via DA1 is better. The foot PR linked above implements:
|
Some of them make sense, imho. For example, the |
@dankamongmen please don't support Rect, it's wrecked. |
but is it the i was unaware of |
@dankamongmen
(I guess technically the |
oh! if i understand what you're saying correctly, we're about to have much better tmux support |
i've reached the same conclusion regarding |
Just to make things absolutely clear... you cannot use % TERM=xterm-direct infocmp -x|grep setaf
setaf=\E[%?%p1%{8}%<%t3%p1%d%e38:2::%p1%{65536}%/%d:%p1%{256}%/%{255}%&%d:%p1%{255}%&%d%;m, |
tmux/tmux#2370 interesting stuff going on here. |
Appears to be a way to set Kitty undercurly RGB colors: % TERM=tmux-direct infocmp -x|grep setal
setal=\E[%?%p1%{8}%<%t5%p1%d%e58:2::%p1%{65536}%/%d:%p1%{256}%/%{255}%&%d:%p1%{255}%&%d%;m,' (58 is the SGR parameter to set the underline color in Kitty) But it's somewhat interresting... I only saw it in |
Just FYI, my understanding is that extension 28 is implicit for terminals at level 4 and above. The VT420, VT510, VT520, and VT525 all support the rectangular area operations, but none of them report extension 28 as far as I know. So technically I think it should only be expected on terminals at level 3 and below - anyone claiming to support level 4 should support these operations regardless. That said, the reality is that you're going to get some TEs (Gnome/VTE being one well known example) that claim to have level 4 or 5 support while not actually implementing most of that functionality. But if you rely on extension 28 being reported before you make use of any rectangular operations, you're going to miss out on a few terminals that do support them (perhaps not ones you'd care about though). It's also worth mentioning that XTerm's implementation of these functions is different from everyone else (specifically, anything involving the default attributes). I don't want to say it's wrong, because I don't know for sure, but it seems likely that's the case. Amongst the others there's also a bit of variation, but it's usually in edge cases that I suspect wouldn't affect you. |
my only plan for rectangular editing at the moment is to use it to quickly clear (large) sixels when most of the space underneath them is blank, so if a terminal doesn't advertise sixel support, there will be no attempt to use rectangular editing. i would hope that anything advertising sixel with '4' is advertising rectangular edits with '28' when they're supported, though i have no real reason to believe that (and indeed you seem to actively contradict that happy notion). |
(the corollary that i would never be using rectangular editing in the presence of kitty graphics is indeed correct, for now) |
huh that sure doesn't look like 0 bitmap emissions to me, argh, another day another bug |
fixed in #2507 |
In that case, I think the terminals that would be affected are RLogin and MLTerm. Last I checked, neither reported extension 28, although they both support the rectangular operations. MLTerm should really be advertising 28, since it's level 3, but RLogin is level 5, so extension 28 is implicit (at least that's my understanding). |
DEC420+ supports
DECFRA
(CSI Pc ; Pt ; Pl ; Pb ; Pr $ x):see #1619 for why this might be expected to work better than
P2=0
. there appears to be no terminfo capability corresponding to this escape sequence, alas.also, what the hell is
defbi
"define_bit_image_region" as mentioned interminfo(5)
?The text was updated successfully, but these errors were encountered: