PdfSoftMask Class
A soft mask (ISO 32000-2, 11.6.5.2): the alpha of the objects painted while it is set comes from a transparency group, its luminosity or its alpha. It is set with PdfExtGState.SoftMask.
public sealed class PdfSoftMaskProperties
| Name | Description |
|---|---|
| None | Gets the absence of soft mask: setting it removes the current soft mask. |
None
PdfSoftMask.csGets the absence of soft mask: setting it removes the current soft mask.
public static PdfSoftMask None { get; }Property value
Methods
| Name | Description |
|---|---|
| FromAlpha(PdfForm, PdfFunction?) | Creates a soft mask from the alpha of a transparency group. |
| FromLuminosity(PdfForm, PdfColor?, PdfFunction?) | Creates a soft mask from the luminosity of a transparency group: white is opaque, black transparent. |
FromAlpha(PdfForm, PdfFunction?)
PdfSoftMask.csCreates a soft mask from the alpha of a transparency group.
public static PdfSoftMask FromAlpha(PdfForm group, PdfFunction? transfer = null)Parameters
groupPdfForm- The group: a form with a
PdfTransparencyGroup. transferPdfFunction?- A function from the alpha of the group to the alpha of the mask (one input, one output);
nullfor the identity.
Returns
PdfSoftMask The soft mask.
FromLuminosity(PdfForm, PdfColor?, PdfFunction?)
PdfSoftMask.csCreates a soft mask from the luminosity of a transparency group: white is opaque, black transparent.
public static PdfSoftMask FromLuminosity(PdfForm group, PdfColor? backdrop = null, PdfFunction? transfer = null)Parameters
groupPdfForm- The group: a form with a
PdfTransparencyGroupwhose color space is set. backdropPdfColor?- The color the group is composited on, in the color space of the group;
nullfor black. transferPdfFunction?- A function from the luminosity to the alpha (one input, one output);
nullfor the identity.
Returns
PdfSoftMask The soft mask.