Merge is a union operation. The resulting features are those from the original state, plus features from a merging McFeatures source. The source McFeatures is not affected.
This method behaves differently depending on the McFeatures type and state. For McPoints, McLines and McRegions with the mcofKeepRegionsAsUnion OptionFlags off, features from the merged McPoints, McLines or McRegions are appended (in this case, the source McFeatures must be of the same type as this one). In this mode, source feature Identifier property values are preserved, and the newly merged features will all have index values starting with the old Count property value. Also, in this mode the source McFeatures must be of the same type (McPoints, McLines or McRegions) as this one.
For McRegions with the mcofKeepRegionsAsUnion OptionFlags on, any McFeatures type may be used as a source. Each pixel from the merging McFeatures, treated as a scan list, is OR'ed with the McRegions pixels. Thus, pixels that are foreground in either will be preserved as foreground in the result. New Identifiers are assigned to the resulting connected regions.
If the Count properties of merging and this McFeatures totals more than one, then the mcofOneFeatureOnly bit in the OptionFlags property is forced off.