I want to know what the intermediate state of the buffer where the Graphics object is drawing some stuff. How do I get hold of the bitmap or the image that it is drawing on?
Not 100% sure what you want here, but if you want to use the graphics class to draw, and then save to file, you have to obtain the Graphics object from a Bitmap file, and then save the bitmap after you are done. You can do that like this:
Bitmap bitmap = new Bitmap(bWidth, bHeight);
Graphics g = Graphics.FromImage(bitmap);
//do all your operations on g here.
bitmap.Save(fileName, imageFormat);