However, since r103.2 (or possibly before - I didn't test it with the intervening beta releases), runtime.overlay_ctx returns null.
In any case, when I think about it, overlay_ctx is probably not the right context to be using - my guess is that this creates a second canvas context that simply (no surprise!) overlays the main canvas. What is needed is a reference to the context of that main canvas.
So my question is: how can I access the context that is passed (as ctx) to draw() ? (The answer may be in the SDK manual, but I haven't been able to find it.)