Hi, I'd like to draw a progress bar with percentage in its center, but I'd like the text to have negative (contrasted) color of the background.
So the part of the text that is over the filled portion of ProgressBar would be white and the part over unfilled portion would be white.
I could do this simply by "cheating"
- painting the black part of the text first
- painting the progress rectangle (it would cover the part to be hidden)
- painting the white text over the progress rectangle only (clipping it)
The performance impact of painting the text twice is negligible in this application, but I'm interested if there is some simple way to do it in two steps only (like having the progress bar somehow invert the already painted text) with blending.