XOR with texture masked

Hi,

I’m working in a 2D editor ( polygons, rectangles, circles, lines, images, etc). Images are represented by textured polygons.
To translate the shapes fast I use the xor operation. My problem is when I translating a masked image.

The xor operation don’t respect the alpha channel, and the masked area from image appear white.

Any idea?

Thank’s.

Stiva