Re: Printing images



On 11/2/07, Igor Gorbounov <igorbounov topazelectro ru> wrote:
> Gtkmm tutorial tells us only about how to print text.
> But what about images? Previously I did it using gnomeprint,
> and now Gtk::PrintOperation and friends - are them usable for
> printing images (a plot, made of lines on Gtk::DrawingArea)?
>     Igor Gorbounov

Yes, you can draw images or anything else using cairo using the
PrintContext::get_cairo_context() method.  You could have one method:
void draw(Cairo::RefPtr<Cairo::Context> cr)
{
...
}

And use this function to draw into your DrawingArea in the expose
event and also use the same function to draw into your print context.

-- 
jonner


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]