Hi list,
I want to be able to draw by free hand over a window. There’s a demo in the wxpython source that does something similar, only over a blank window. I want to draw over the window’s children controls (It’s a note-taking app and I want to be able to doodle over my text notes…).
What I first thought of was a transparent window over the underlying controls that held the functionality to draw by free-hand. Since my system doesn’t support transparency, I had to think of something else.
This is what is trying now: I’m basically taking a screenshot of the underlying window and its controls (rather, getting it as a BMP using wx.MemoryDC and friends), and setting this BMP as the background of the window where I can draw by free-hand. This works but it seems that I can only get as BMP the visible parts of a window. Since my underlying window is a scrolled window and the contents are much larger than screen size, I have problems with getting the BMP of the parts that are out of the screen.
Attached are two screenshots. The first is a free-hand drawing over a window and its controls (rather, a drawing over a BMP of a window) and the second is what happens when I try to scroll said BMP. I took the BMP of the whole underlying window, but the part that was not on screen is corrupted.
Is there a better way of drawing over a window and its controls? Is there a way to get the BMP of what a window would look like if it were visible?
Thanks!