CreateSoftMask(PdfSoftMaskType, PdfFormXObject, IReadOnlyList?, PdfFunction?) Method

Definition

Namespace Broadside
Assembly Broadside.dll

Creates a soft-mask dictionary whose mask values come from a transparency group XObject, or returns the one this document already has for the same values.

public PdfSoftMask CreateSoftMask(PdfSoftMaskType type, PdfFormXObject group, IReadOnlyList<double>? backdrop = null, PdfFunction? transferFunction = null)

Parameters

type
PdfSoftMaskType

How the values are derived: the group's alpha, or its luminosity over the backdrop.

group
PdfFormXObject

A transparency group XObject of this document (CreateTransparencyGroup()); for a luminosity mask its group colour space shall be set. Its bounding box bounds the mask; its matrix maps it into the coordinate system of the gs that sets the mask.

backdrop
IReadOnlyList<Double>

For a luminosity mask, the backdrop colour (BC) the group composites over, one component per component of the group colour space; null, the default, is that space's initial colour, black. Not allowed for an alpha mask.

transferFunction
PdfFunction

The transfer function (TR) applied to the alpha or luminosity, a function of this document from 1 input to 1 output; null, the default, is the identity.

Returns

PdfSoftMask
The mask: a new indirect << /Type /Mask /S ... /G ... >>, to set with SetSoftMask(PdfSoftMask?).

Remarks

ISO 32000-2 §11.6.5.1, Table 142 (PDF 1.4), §11.5.2 and §11.5.3. Outside the group's bounding box the mask value is the transfer function of 0 (alpha) or of the backdrop's luminosity (luminosity). Records PDF 1.4 and the function's version. A mutation.