Font color mask (invert/negative)?
796283Feb 27 2012 — edited Mar 4 2012I'm not sure if the subject is an accurate description, but what I'm trying to accomplish is have the font color of a string change depending on the background color, but not for the entire string, only the portions needed.
Simplest way to imagine what I'm getting at is:
Picture the monitor being in black and white (black on the left half, white on the right half).
There's an arbitrary string entirely on the left half in white font.
As you click and drag that text towards the right, the individual letters change from white to black to become visible on the right hand side.
Eventually what I'd like to get at would be the letters themselves would start to change color even before the entire letter is on the opposite side. (i.e. using the example above, the letter "O" could be half white, half black if it was on the border between black and white).
I tried looking at the Graphics and Graphics2D classes, thinking I'd have to use my own rendering, or apply a mask to the font to invert the underlying colors where the text would be, but wasn't able to find anything that could connect the two.