- (call-with-canvas [canvas canvas?] [proc (-> canvas? any)]) -> anyprocedure
- (call-with-canvas [context context?] [data (or/c string? pointer?)] [proc (-> canvas? any)]) -> anyprocedure
Calls the given procedure with the given canvas and makes sure the canvas is synchronized with external resources around the call.
If called in the three argument form, a fresh canvas is created using the given context and is automatically destroyed upon return from the given procedure.