Hi All,
In order to ease the creation of application documentation I added a
screen-grab btn to my app's toolbar. The code snippet below implements
this functionality.
Is there a way (in Linux), to get the whole toplevel screen with all
it's decorations - status and toolbar, not only the client area?
def snapshot(self):
"""
get a snapshot of the current screen and save to file
"""
panel = wxGetTopLevelParent(self)
context = wxClientDC(panel)
memory = wxMemoryDC()
x,y = panel.GetClientSizeTuple()
bitmap = wxEmptyBitmap(x,y, -1)
memory.SelectObject(bitmap)
memory.Blit(0,0,x,y, context, 0,0)
memory.SelectObject(wxNullBitmap)
bitmap.SaveFile("test.png", wxBITMAP_TYPE_PNG)
regards
···
--
Thys Meintjes
BEng Electronic (UP), MEng Bio (UP)
Intrepid Investigator of Interesting Things
+27 82 3764 602