From 0d37d123c9afb1974de4a96929bed327ed040803 Mon Sep 17 00:00:00 2001 From: Christopher Davis Date: Tue, 28 Sep 2021 22:59:37 -0700 Subject: [PATCH] image_view: Add note to investigate printing This is one of the features we need for the MVP, but printing is a bit beyond my current knowledge. So, I need to research this. Onto other things for now, so I'll add note. --- src/widgets/image_view.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/widgets/image_view.rs b/src/widgets/image_view.rs index 3bed99a..0e228fe 100644 --- a/src/widgets/image_view.rs +++ b/src/widgets/image_view.rs @@ -309,10 +309,12 @@ impl IvImageView { op.set_n_pages(1); }); + // FIXME: Rework all of this after reading https://cairographics.org/manual/cairo-Image-Surfaces.html + // Since I don't know cairo; See also eog-print.c operation.connect_draw_page(clone!(@weak pb => move |_, ctx, _| { let cr = ctx.cairo_context().expect("No cairo context for print context"); cr.set_source_pixbuf(&pb, 0.0, 0.0); - cr.paint(); + let _ = cr.paint(); })); log::debug!("Running print operation...");