paint in GDI to contrast background?
Posted on 2011-09-03
Hello, if (using GDI) I need to annotate an arbitrary bitmap, I don't know what color is behind what I'm drawing. It would be convenient if there was a brush or color that would automatically contrast the pixels behind it. I remember this from way back in the day, BASICA had a XOR brush which would basically invert what was behind it. Is it possible there is something BASICA could do that .NET can't?
Anyway is there any simple/fast technique in GDI to accomplish an automatic contrast (or distinction) with the background? Obviously I could test the background, do some averaging, and choose a contrasting color but that's time consuming and exactly what im trying to avoid.
Also, alpha doesn't really work very well for this.
Any thoughts are appreciated, thanks.