[rust] fix build, remove raqote

pull/1706/head
joseLuís 3 years ago
parent 7e51f04111
commit e839a95c2b

@ -39,7 +39,6 @@ serial_test = "^0.5.0"
serial_test_derive = "^0.5.0"
rand = "^0.8"
raqote = "0.8.0"
# https://doc.rust-lang.org/cargo/reference/profiles.html
[profile.dev]

@ -2,7 +2,6 @@
// https://github.com/dankamongmen/notcurses/issues/1700
use libnotcurses_sys::*;
use raqote::*;
const W: u32 = 16;
const H: u32 = 8;
@ -12,12 +11,17 @@ fn main() -> NcResult<()> {
println!("pixel support: {:?}", nc.check_pixel_support());
// use raqote to create a purple rectangle, 16 width, 8 height
let mut dt = DrawTarget::new(W as i32, H as i32);
dt.clear(SolidSource::from_unpremultiplied_argb(255, 80, 20, 190));
// dt.write_png("example.png"); // to check the image is OK
let vframe1 = NcVisual::from_bgra(dt.get_data_u8(), H, W * 4, W)?;
// create a purple rectangle
let mut buffer = Vec::<u8>::with_capacity(H as usize * W as usize * 4);
#[allow(unused_parens)]
for _byte in (0..={ H * W }) {
buffer.push(190);
buffer.push(20);
buffer.push(80);
buffer.push(255);
}
let vframe1 = NcVisual::from_bgra(&buffer, H, W * 4, W)?;
// BUG: draws vertical stripes
let voptions = NcVisualOptions::without_plane(0, 0, 0, 0, H, W, NCBLIT_1x1, 0, 0);

Loading…
Cancel
Save