Try this, I think there is more wrong but at least this part is documented in TCanvas:
- You should lock /unlock the canvas while drawing in a thread.
- You should create an array of two bitmaps in the main thread, say Bitmaps := array[false,true] of TBitmap;
- In the thread, simply lock, draw, unlock then synchonize the swap of the bitmaps from memory to screen and the other one from screen to memory , not create the bitmap there.
That way you have one bitmap for display and one bitmap for threadsafe drawing. It is also very,very speedy. Because interlockedExchange just swaps the pointers. (Hint...)