Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

How does XOR mode work?

mode XOR
0
Posted

How does XOR mode work?

0

XOR mode restores the colors if you do it twice. The Color argument when you enable XOR mode allows the system to calculate the pixel value you want to XOR with in a system-independent manner. In other words, if you know that the color on the screen is (predominantly) white, and you want to XOR with some value that changes that white to green and then back again, you have no way of calculating the appropriate pixel value to use to make those alternations. So, you tell us the two colors that you are interested in alternating when you draw and then we will calculate the appropriate pixel value for you taking into account the Color Model of the screen. Other colors will be changed in a random, but reversible manner as per the boolean XOR operation.

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.