Description

A McRegions instance to specify image masking.

Property type

An Unknown object.  

Syntax

[Set] object.RegionMask [= Unknown]

The RegionMask Property syntax has these parts:

PartDescription
objectAn expression evaluating to an object of type McRegionAccess.
UnknownAn Unknown object.

Remarks

The RegionMask property is used by PutLine, PutArea and SetToConstant to only modify pixels that lie inside the region feature(s) of the assigned McRegions instance. Assignment with 'Nothing' or an IsReset McRegions turns off all region masking.

Note that masking may be disabled if FastAccess mode is enabled because the client may have direct access to the image.

Exceptions

E_INVALIDARG or E_NOINTERFACE -- the contents of vMask do not refer to an IMcRegion object.

Notes

If the McRegions source being assigned to the RegionsMask property IsReset, then no RegionsMask is set. That is, an IMcRegions that is in the IsReset state is treated just as if it were 'Nothing.

By default, the coordinates of regions in the RegionMask are treated as coordinates on this McRegionAccess' backing McImage. This is almost always the correct alignment so long as the parent McImage of the McRegions is the same as the McImage backing this McRegionAccess instance. However, when the RegionMask property has been assigned an McRegions from another McImage, an adjustment to the RegionMask registration with the McImage may be necessary. Call the SetRegionMaskOffset method to set this registration offset. The RegionMaskOffset is always reset to zero when any assignment is made to the RegionMask property.

Setting RegionMask to anything other than Nothing will force FastAccess to FALSE. Masking is not performed on PutLine or PutArea if the source came from GetLine or GetArea on the same image in FastAccess mode.