|
| Normally, when you draw in the Graphics context, it draws the color that you have set for the foreground color. In other words, this mode overwrites any color that was present before. This is called Paint mode. There is also a second mode, XOR mode, which you select with a call: g.setXORMode(xorColor); XOR mode changes the behavior in the following ways:
If you draw a shape in XOR mode, with a certain color, and then draw it again in the same position with the same color, the effect is as if you hadn't drawn anything in the first place.
|
This page was last modified on 02 October, 2007 |