Drawing in XOR mode

Is there a simple way to draw a rectangle XOR:ed with content already on the canvas? Its for a selection thingy.

yeeuch… xor is so 1980s! I’ve not added anything to do xoring, mainly because it’s dying out - more modern OSes tend to discourage it because it doesn’t fit well with vector drawing methods. It always makes me cringe when I see it used nowadays - especially when it’s done as a preview for things like window size or dragging objects around. Use a black and white dashed line instead!

Sorry, I’m old. I want my XOR !! :wink: Anyways, I accomplished it through drawing to an Image first, then XORing the pixels in the image, then drawing it to the Graphics context. Works fine, but I can agree with you, its not so very pretty…