I would like to save the looks of a GTK window, and all the buttons and other widgets it contains to a PNG or PDF file. Cairo supports drawing on such surfaces.
Could I somehow ask a GTK widget to draw itself on Cairo surface?
A code sample would be much appreciated, since I am a newcomer to both GTK and Cairo.
Python is my language of choice.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…