XorRgn
XorRgn Find the union, less the intersection of two regions
#include <Quickdraw.h> Quickdraw
void XorRgn(srcRgnA, srcRgnB, destRgn );
RgnHandle srcRgnA ; the two existing . . .
RgnHandle srcRgnB ; . . . source regions
RgnHandle destRgn ; handle of region to hold result
XorRgn calculates the union of two regions, except for any portions that
overlap, and stores the result into a third region.
srcRgnA and . . .
srcRgnB are handles of existing regions in the current GrafPort.
destRgn is the handle of an existing region. Its current structure is
destroyed and it is given the structure defining a logical XOR of the
areas of srcRgnA and srcRgnB . It is OK if this parameter is the
same as either of the source regions.
Returns: none

Notes: The destRgn must already exist (see NewRgn). The difference between
the union and the intersection of srcRgnA and srcRgnB is calculated, and
the result is stored as destRgn :
srcRgnA srcRgnB destRgn
This is functionally equivalent to the following sequence:
RgnHandle uRgn, sRgn;
NewRgn( uRgn );
NewRgn( sRgn );
UnionRgn( srcRgnA, srcRgnB, uRgn );
SectRgn( srcRgnA, srcRgnB, sRgn );
DiffRgn( uRgn, sRgn, destRgn );
DisposeRgn( uRgn );
DisposeRgn( sRgn );
If srcRgnA is identical to srcRgnB , then destRgn is set to a region defined
by the empty rectangle (0,0)(0,0). You can test for this via EmptyRgn.