[cairo] IncludeInferiors, Pixmap/Window distinction

Bill Spitzak spitzak at gmail.com
Thu Jul 22 10:37:40 PDT 2010

I don't think Cairo programs should rely on copying areas to do scrolling.

Recommended alternatives in order of importance:

1. Fix your program so it redraws during idle, rather than after every 

2. Figure out how to draw your window's contents faster. In particular 
figure out how to skip drawing of parts that are not visible.

3. If you really really think you need "scrolling", then use a child 
window with much larger area, and move it. It will be clipped to the 
parent and you will get normal (and correct!) expose events for the 
exposed area. And this correctly moves this bi-directional communication 
out of the drawing library and into the windowing library.

With that, the only purpose of using a window as a source is to get a 
"screen shot". This has a lot more freedom in allowing some areas to be 
wrong. I think you should get an image that is the size of the window 
(ie not clipped to the screen area), and that "wrong" pixels should be 
transparent black, not unknown values. However "wrong" pixels could 
cover the entire window if you want (for instance when it is not mapped).

More information about the cairo mailing list