For the record, here's an example of that technique.
At Tue, 27 Jan 2015 11:23:29 -0700, Matthew Flatt wrote: > You can draw on the canvas from the outside using `get-dc`. Possibly, > though, you're seeing your drawing erased when the canvas receives a > refresh event from the window system. > > See > > http://docs.racket-lang.org/gui/canvas___.html > > for more about `on-paint` and the impermanence of drawing from the > outside. > > If you need to draw from the outside and there's not a good way to > reconstruct the drawing at any time within `paint-callback`, then one > common strategy is: Draw to a bitmap, copy the bitmap to the canvas > whenever the bitmap content is changed, and also have `on-paint` copy > the bitmap to the canvas.
offscreen-example.rkt
Description: Binary data
____________________ Racket Users list: http://lists.racket-lang.org/users

