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
Unable to debug NcPlane::gradient
#19
Comments
Thanks for the bug report, I suspect this may be related to recent updates to the static channels functions in the C library. I'll try to update the Rust bindings and fix any related bugs. |
It turns out it wasn't that. The good news is that I've reproduced your issue, so it's an implementation bug. I'll investigate it further and will attempt to fix it soon. BTW are you running an older version of the library? I've updated your code to the last version pointing the differences: use libnotcurses_sys::*;
fn main() -> NcResult<()> {
let nc = unsafe { Nc::with_flags(NcFlags::SuppressBanners))? }; // <=
let splane = unsafe { nc.stdplane() };
let header_bg_channel = NcChannel::from_rgb8(
57,
100,
200,
);
let header_fg_channel = NcChannel::from_rgb8(
200,
200,
200
);
let header_combined_channel = NcChannels::combine(header_fg_channel, header_bg_channel);
splane.gradient(
Some(0),
Some(0),
Some(1),
None,
" ",
NcStyle::None, // <=
header_combined_channel,
header_combined_channel,
header_combined_channel,
header_combined_channel,
)?;
nc.render()?;
unsafe { nc.stop()?; } // <= notcurses must be stopped before exiting or it will leak
Ok(())
} |
Yes, I'm currently running on |
I've updated version 3.3.0 that should have the gradient problems fixed. You'll have to update to the new syntax, though. |
I've been meaning to draw empty cells across a line, yet am unable to debug why
gradient
function is throwing error.Here's a simple reproducible example.
In some rare cases, it does render with garbage values filled in. Am I doing something wrong or making some invalid assumptions?
OS: Arch
Terminals: Xterm, Alacritty, Kitty
The text was updated successfully, but these errors were encountered: