Supported Browsers Home   
OffsetRegion Previous   
PtInRegion Next   
GA_regionFuncs Up   

OptimizeRegion

Optimizes the union of rectangles in the region to the minimum number of rectangles.

Declaration

void NAPI GA_regionFuncs::OptimizeRegion(
    GA_region *r)

Prototype In

snap/graphics.h

Parameters

r

Region to optimize

 

Description

This function optimizes the specified region by traversing the region structure looking for identical spans in the region. The region algebra functions (UnionRegion, DiffRegion, SectRegion etc.) do not fully optimize the resulting region to save time, so after you have created a complex region you may wish to call this routine to optimize it.

Optimizing the region will find the minimum number of rectangles required to represent that region, and will result in faster drawing and traversing of the resulting region.

See Also

UnionRegion, DiffRegion, SectRegion

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