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 PdfSoftMask

Properties

NameDescription
NoneGets the absence of soft mask: setting it removes the current soft mask.

Gets the absence of soft mask: setting it removes the current soft mask.

public static PdfSoftMask None { get; }

Property value

PdfSoftMask

Methods

NameDescription
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.cs

Creates a soft mask from the alpha of a transparency group.

public static PdfSoftMask FromAlpha(PdfForm group, PdfFunction? transfer = null)

Parameters

group PdfForm
The group: a form with a PdfTransparencyGroup.
transfer PdfFunction?
A function from the alpha of the group to the alpha of the mask (one input, one output); null for the identity.

Returns

PdfSoftMask The soft mask.

FromLuminosity(PdfForm, PdfColor?, PdfFunction?)

PdfSoftMask.cs

Creates 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

group PdfForm
The group: a form with a PdfTransparencyGroup whose color space is set.
backdrop PdfColor?
The color the group is composited on, in the color space of the group; null for black.
transfer PdfFunction?
A function from the luminosity to the alpha (one input, one output); null for the identity.

Returns

PdfSoftMask The soft mask.