SetSoftMask(in DisplaySoftMask) Method

Definition

Assembly Broadside.dll

Sets the soft mask the paints that follow composite through, or removes it (IsNone).

void SetSoftMask(in DisplaySoftMask mask)

Parameters

mask
DisplaySoftMask

The mask: its group's list in mask space, how values derive from it, its backdrop and transfer function.

Remarks

ISO 32000-2 §11.5, §11.6.4.3 and §11.6.5.1. Every paint's source shape (when IsShape) or opacity is multiplied, point by point, by the mask value there, on top of its coverage, clip and alpha constant. The call arrives before the first paint it applies to, only when the mask changes, and SaveState() and RestoreState() save and restore it. It applies to paints only: a group's result composites through SoftMask instead, and a group's content starts with no mask (§11.6.6), which this call sets inside it when the backend holds one.

An image with a mask of its own (soft mask, explicit or colour key mask, or an opacity channel) is preceded by a call with no mask: the image's mask overrides the graphics state's for that image (§11.6.4.3).

The same mask (same Content and Matrix) usually arrives many times in one replay; a backend renders it once and keeps it. A backend that cannot apply soft masks paints unmasked and reports that it did.