1995-1996
Spencer Kimball & Peter Mattis
Create a layer mask for the specified layer.
This procedure creates a layer mask for the specified layer. Layer masks serve as an additional alpha channel for a layer. Different types of masks are allowed for initialisation: - white mask (leaves the layer fully visible); - black mask (gives the layer complete transparency); - the layer's alpha channel (either a copy, or a transfer, which leaves the layer fully visible, but which may be more useful than a white mask); - the current selection; - a grayscale copy of the layer; - or a copy of the active channel. The layer mask still needs to be added to the layer. This can be done with a call to 'gimp-layer-add-mask'. 'gimp-layer-create-mask' will fail if there are no active channels on the image, when called with 'ADD-CHANNEL-MASK'. It will return a black mask when called with 'ADD-ALPHA-MASK' or 'ADD-ALPHA-TRANSFER-MASK' on a layer with no alpha channels, or with 'ADD-SELECTION-MASK' when there is no selection on the image.
unknown
Type | Name | Description |
---|---|---|
PF_LAYER | layer | The layer to which to add the mask |
PF_INT | mask-type | The type of mask { ADD-MASK-WHITE (0), ADD-MASK-BLACK (1), ADD-MASK-ALPHA (2), ADD-MASK-ALPHA-TRANSFER (3), ADD-MASK-SELECTION (4), ADD-MASK-COPY (5), ADD-MASK-CHANNEL (6) } |
Type | Name | Description |
---|---|---|
PF_CHANNEL | mask | The newly created mask |