Re: cairo & pixmap



On Sat, 2007-05-19 at 14:12 +0200, control H wrote:
The signal handler for the expose event is passed some parameters
specifying which part of the screen has become invalidated. If you use
these in a Cairo drawing mask, then redraw your canvas, it should be
quite fast, as Cairo will ignore all operations to areas outside the
mask.

But this means -if I understand correctly- that I still have to redraw
"from scratch", be it not the complete drawing area but only the
invalidated part. Therefore, it will still be slower than in my old
"GDK based" situation, especially when the to be drawn picture becomes
more complex (which in my situation is the case).

That's how I've done it in programs I've written, but I'm far from an
expert on the subject. There may well be a way to double-buffer the
canvas, and just blit the exposed area from the buffer.

Do you/does anybody know what the technical reason is why cairo
contexts fail outside the expose signal? I'm just curious.

I'm not sure what you mean here, sorry.


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