CreateMask

The CreateMask method creates a grayscale "mask" from active imagespace content.

CreateMask

Parameters

Method has no parameters

Remarks

Mask is a special imagespace containing grayscale image. This method gets image from active imagespace (the SelectClipboard method sets which imagespace is active) and store it as a mask.
Image mask is necessary for performing mask copying when content of one imagespace overlays content of other imagespace. Mask allows to manage the level of transparency for every pixel of top image. The black pixels on mask mean absolutely opaque pixels: the pixels from top level image do not affect corresponding pixels from bottom level image (bottom level pixels remain unchanged). The white pixels on mask mean absolutely transparent pixels: the pixels on bottom level image will be replaced with corresponding pixels from top level image. The gray pixels mean partial transparency.
For example, if you draw a white triangle on black background (or read ready image file from disk), call CreateMask for this image, create necessary content in the promary and secondary imagespaces then after calling the MaskCopy method the top level image will be cut to triangle and placed over bottom level image.

Example
See the MaskCopy method.