30/40 FPS as it's running the drawing code in a 10x loop actually isn't too bad. The performance I get out of BGRABitmap and LineTo isn't bad either, so I'm not really looking for techniques to speed up the drawing.
Ah, yes, I didn't even see that you already had a 10 loop. I packed that same loop into a 100 loop. So 1000 times to the bitmap took 2.5 to 3.2 secs. That is good.
I didnt test the bitmap to screen. But that should be fine too.
Not tested, but what may be faster...
Instead of
TempOutput.Canvas.Ellipse
Create this once as an image to its own bitmap (once for each color). At app start.
Then just copy bitblt the small image to each target location on the bigger image.
--
If I run the drawing without your 10 loop, the close button works.
but that depends on the cpu, and system load. Mine just cleared the queue fast enough in that case.