Supported Browsers Home   
MGL_unionRegion Previous   
MGL_unionRegionRect Next   
External Functions Up   

MGL_unionRegionOfs

Computes the Boolean union of two regions and offsets the result.

Declaration

ibool MGLAPI MGL_unionRegionOfs(
    region_t *r1,
    const region_t *r2,
    int xOffset,
    int yOffset)

Prototype In

mgraph.h

Parameters

r1

Region with which r2 is unioned, and also becomes the result region.

r2

Region to be unioned with r1

xOffset

Offset to add to all x coordinates in region 2

yOffset

Offset to add to all y coordinates in region 2

 

Return Value

True if the union is valid, false if an empty region was created.

Description

Computes the Boolean union of two regions for the area covered by region r1 and region r2, computing the resulting region in r1, which may result in an empty region. This routine also adds the specified (x,y) offset value to all the coordinates in region 2 before they are unioned with region 1, which allows you to quickly do a union with a translated region without needing to explicitly translate the region itself. If you need to retain the value of r1, you need to first copy r1 to a temporary region.

See Also

MGL_diffRegion, MGL_sectRegion, MGL_unionRegion, MGL_unionRegionRect

Copyright © 2002 SciTech Software, Inc. Visit our web site at http://www.scitechsoft.com