XorRgn
XorRgn
Find the union, less the intersection of two regions void XorRgn(srcRgnA, srcRgnB, destRgn ); 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.
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:
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.