-
-
Notifications
You must be signed in to change notification settings - Fork 112
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
interpolated resize has the wrong size #1797
Comments
i assume this is recent breakage? if so, it's probably related to #1789's fix. need better unit testing! |
i confirm your behavior. i have a unit test on this stuff, i think, so it's odd that we're seeing this. let me try and trace it down. |
check out the PoC i've added, |
looking at // resize the ncvisual (doesn't use interpolation)
let voptions4 =
NcVisualOptions::without_plane(7, 37, 0, 0, pg.cell_y, pg.cell_x, NCBLIT_PIXEL, 0, 0);
v1.resize_noninterpolative(pg.cell_y * 4, pg.cell_x * 4)?;
v1.render(&mut nc, &voptions4)?;
rsleep![&mut nc, 1];
// resize the ncvisual (uses interpolation)
let v5 = NcVisual::from_rgba(buffer.as_slice(), pg.cell_y, pg.cell_x * 4, pg.cell_x)?;
let voptions5 =
NcVisualOptions::without_plane(7, 51, 0, 0, pg.cell_y, pg.cell_x, NCBLIT_PIXEL, 0, 0);
v5.resize(18 * 4, 9 * 4)?; // FIXME: render function fails when downsizing (y<18 | x<9) in one you've got |
and we would expect them to change with the cell-pixel geometry, i.e. with different terminals, which is exactly what we see...no? |
ok I've confirmed your poc works in all terminals, I'll fix my example, sorry about that |
well, it might not necessarily be your sample -- it might be the particular geometries you're using, etc. let's leave this open until we know for sure (unless you agree with my assessment above). feel free to play around with or look at that |
Don't worry! It was what you said, I forgot those contant values in there... it's fixed in 90a2ff6 |
using the pixel-cell.rs example:, it shows the interpolated resize is either smaller (alacritty, wezterm) or larger (xterm) than it should be.
in latest alacritty:
in xterm:
in latest nightly wezterm:
can't test in kitty because #1796
The text was updated successfully, but these errors were encountered: