From f9418f875d88fd08a6c2af18a24da19b5033320f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?joseLu=C3=ADs?= Date: Wed, 9 Jun 2021 10:18:30 +0200 Subject: [PATCH] [rust] update example #1716 #1742 --- rust/examples/issue-1716.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/rust/examples/issue-1716.rs b/rust/examples/issue-1716.rs index e05dd138a..8e272e603 100644 --- a/rust/examples/issue-1716.rs +++ b/rust/examples/issue-1716.rs @@ -19,7 +19,9 @@ fn main() { } let vframe1 = NcDirectF::from_bgra(&buffer, H, W * 4, W).expect("couldn’t create visual"); - let v = vframe1.ncdirectf_render(nc, NCBLIT_PIXEL, NCSCALE_NONE, 0, 0).expect("failed to render image to sixels"); + let mut voptions1 = NcVisualOptions::without_plane(0, 0, 0, 0, H, W, NCBLIT_PIXEL, 0, 0); + let v = vframe1.ncdirectf_render(nc, &mut voptions1) + .expect("failed to render image to sixels"); nc.raster_frame(v, NCALIGN_LEFT).expect("failed to print sixels"); vframe1.ncdirectf_free(); nc.stop().expect("failed to destroy ncdirect context");