notcurses/rust/examples/poc-kittyzapper.rs
joseLuís eaee89c99f [rust] renamed FullMode & DirectMode to Nc & NcD
- improve pixel-cell example.
- rustfmt
2021-04-17 22:13:43 +02:00

25 lines
502 B
Rust

//! based on the proof of concept at ../../src/poc/kittyzapper.c
use libnotcurses_sys::*;
fn main() -> NcResult<()> {
let mut dm = NcD::new()?;
dm.set_fg_rgb8(100, 100, 100)?;
dm.set_bg_rgb8(0xff, 0xff, 0xff)?;
printf!("a");
dm.set_bg_rgb8(0, 0, 0)?;
printf!("b");
printf!(" ");
printf!(" ");
dm.set_bg_rgb8(0, 0, 1)?;
printf!("c");
printf!(" ");
printf!(" ");
dm.set_bg_rgb8(0xff, 0xff, 0xff)?;
printf!("d");
printf!("\n");
Ok(())
}