Symbian Developer Library

SYMBIAN OS V6.1 EDITION FOR C++

[Index] [Glossary] [Previous] [Next]



Using TRegionFix


Overlapping

Note that when adding a rectangle to a region, if that rectangle overlaps an existing rectangle, the operation will cause more than one rectangle to be created. For example,

TRegionFix<5> fixedRegion;
for(TInt index=0;index<3;index++)
    fixedRegion.AddRect(TRect(index*4,index*4,index*4+8,index*4+8));

In the above code, on exiting the loop, fixedRegion contains five rectangles. An attempt to add a further rectangle will cause its error flag to be set and will clear the region.