Is there a cairo like surface for the screen without the window hassle

Travis Griggs travisgriggs at gmail.com
Tue Feb 3 13:07:46 EST 2015


> On Feb 2, 2015, at 5:20 AM, Antoon Pardon <antoon.pardon at rece.vub.ac.be> wrote:
> 
> I need to have a program construct a number of designs. Of course I can directly
> use a pfd surface and later use a pdf viewer to check. But that becomes rather
> cumbersome fast. But if I use a cairo-surface for on the screen I suddenly have
> to cope with expose events and all such things I am not really interested in.
> 
> So does someone know of a package that provides a cairo like surface but that
> would take care of the events in a rather straight forward matter, so that my
> program could make it's design in a window on the screen just as if it is
> designing it in a pdf file.
> 

For the most part, you cannot draw directly to the screen with Cairo. Some OSes kind of allow out, but they won’t repaint it for you. Any viewing software that will auto detect file updates and reload would do the trick. For example, I know that preview on OS X will automatically reload a png file that I write. Cairo can generate png output. Just open preview on the file, and then have the program rewrite the same file.



More information about the Python-list mailing list