Re: printer in Gtk

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

 



Le lundi 17 janvier 2005 Ã 15:00 +0100, Joerg Anders a Ãcrit :
> Hi all!
> 
> I'm about to decide between Qt or Gtk for my new project. One
> important issue is printing. With Qt you can paint something
> with a painter:
> 
> For exammple the function:
> 
>    void MyWidget::draw(QPainter *p) {
>           p->begin(this);
>           p->drawArc(4, 4, 100, 100, 0, 16*360);
>           p->end();
>    }
> 
> paints a circle on widget surface if you call it such a way:
> 
>     QPainter *p = new QPainter(this);
>     draw(p);
> 
> If you want to print the widget content you call it such a way:
> 
>     QPrinter *pr = new QPrinter();
>     pr->setup(this);
>     QPainter *p = new QPainter(pr);
>     draw(p);
> 
> This way a real WhatYouSeeIsWhatYouGet - editor is possible. I'd decide
> for Gtk if there were a similar way. But I didn't find any pointer
> neither in documentation nor in the tutorials nor in FAQs.
> 
> Any suggestions ?
> 

There is no printing support in Gtk yet (might come with cairo). But you
can use libgnomeprint. The drawback is that you need a separate function
to print.

_______________________________________________

gtk-list@xxxxxxxxx
http://mail.gnome.org/mailman/listinfo/gtk-list

[Index of Archives]     [Touch Screen Library]     [GIMP Users]     [Gnome]     [KDE]     [Yosemite News]     [Steve's Art]

  Powered by Linux