[cairo] Qt example in cairo-demo

Zack Rusin zack at kde.org
Tue Jan 25 18:35:05 PST 2005


On Tuesday 25 January 2005 16:00, Carl Worth wrote:
> On Tue, 25 Jan 2005 15:06:28 -0500, Zack Rusin wrote:
> > Could someone do me a huge favor and maybe add:
> > http://ktown.kde.org/~zrusin/qcairo.tar.bz2
> > to cairo-demo?
>
> Done. Thanks!
>
> I updated it to include <cairo-xlib.h> as now required, and I added a
> simple README file.
>
> > I can write something more involved if you think that it
> > makes more sense.
>
> This looks like just the thing to get a QT programmer started.

Hey, sorry to bother you again but after work today I sat down and 
cleaned it up a little bit. 
1) I created a QCairoWidget which has a 
virtual void cairoPaint(cairo_t *) 
method which essentially replaces the QWidget::paintEvent. It's done 
essentially to enable people to just take the widget, stick it in their 
app and just use Cairo (either duble-buffered or not).
2) Instead of the old demo code it uses now kapow. It's a little bit 
more attractive and nicely shows how to use QCairoWidget.

Zack

-- 
It's not the size of your stack that matters, it's how you push and
pop .
-------------- next part --------------
A non-text attachment was scrubbed...
Name: qcairo.diff
Type: text/x-diff
Size: 22181 bytes
Desc: not available
Url : http://lists.freedesktop.org/archives/cairo/attachments/20050125/91005b22/qcairo.bin


More information about the cairo mailing list