I'm writing an application where I need a crosshair cursor to pick points on an arbitrary image. Being as the image may contain both light and dark regions, I'm looking to XOR the cursor on top of the image, thus inverting the colours of the pixels where the cursor lies. In order to illustrate what I mean, please see the following image...
My application will be written using WPF and C#.NET. The image will be displayed in a Canvas within a ScrollViewer, where the cursor will be contained within a .png file. The cursor image file contains a white cursor on a black background so that it will produce the correct results once it's "blitted" onto the image with an XOR operation. I've also gone with the approach of having the cursor as an image file because I will need to show instances of the cursor at selected points within the image.
Of course, another important requirement is that the drawing operation should run as fast as possible, as it's basically a cursor that will move constantly as the user moves the mouse.
Thanks in advance!