I have a Image that I draw a background compass type rose as shown below and then a pointer.
I draw the background first and then the pointer. When I go to redraw I am seeing a ghost of the pointer on the screen. I use the following code to draw the 2.
using (Bitmap compassCopy = new Bitmap(bitmaps.compassPointerBitmap.Width, bitmaps.compassPointerBitmap.Height))
{
//
// Draw the initial bitmap
//
compassImage.Bitmap.DrawImage(0, 0, bitmaps.compassBitmap, 0, 0, 200, 200);
compassImage.Render();
//
// Draw the direction arrow if there is any to display
//
if (drawCompass)
{
compassCopy.RotateImage(displayHeading, 0, 0, bitmaps.compassPointerBitmap, 0, 0, 220, 220, 255);
compassCopy.MakeTransparent(Color.Black);
compassImage.Bitmap.DrawImage(-10, -10, compassCopy, 0, 0, compassCopy.Width, compassCopy.Height);
}
compassImage.Invalidate();
}
The attached images show the Image after I make the call to draw the background (I inserted an Invalidate to see this - not shown in the code above. Also I included the 2 images I use. The background one has the same background colour as the main screen.
The arrow one does have an arrow in a dark gray. This was needed so I could use BLACK as the transparent colour. When I rotate this the area in the corners becomes black.