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.
This commit is contained in:
Christopher Davis 2021-09-28 22:59:37 -07:00
parent 945aff3029
commit 0d37d123c9

View file

@ -309,10 +309,12 @@ impl IvImageView {
op.set_n_pages(1); 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, _| { operation.connect_draw_page(clone!(@weak pb => move |_, ctx, _| {
let cr = ctx.cairo_context().expect("No cairo context for print context"); let cr = ctx.cairo_context().expect("No cairo context for print context");
cr.set_source_pixbuf(&pb, 0.0, 0.0); cr.set_source_pixbuf(&pb, 0.0, 0.0);
cr.paint(); let _ = cr.paint();
})); }));
log::debug!("Running print operation..."); log::debug!("Running print operation...");