NewSoftMaskGraphicsState

Vector graphics, Transparency, Form XObjects

Description

Creates or reuses an ExtGState that applies a captured Form XObject as an alpha or luminosity soft mask, or creates a reset state that writes /SMask /None

Syntax

Delphi

Function TPDFlib.NewSoftMaskGraphicsState(CaptureID, MaskType: Integer; Const Backdrop, TransferFunction: WideString): Integer;

Parameters

CaptureIDCaptured Form XObject ID, or 0 when MaskType is PDF_SOFT_MASK_NONE
MaskTypePDF_SOFT_MASK_ALPHA, PDF_SOFT_MASK_LUMINOSITY, or PDF_SOFT_MASK_NONE
BackdropEmpty string, or a PDF numeric array containing exactly three backdrop components from 0 through 1 for the isolated DeviceRGB transparency group
TransferFunctionEmpty string, /Identity, or a PDF function dictionary, stream, or indirect reference with a numeric FunctionType

Return values

Returns a reusable graphics-state ID, otherwise 0

Remarks

The captured form is configured as an isolated DeviceRGB transparency group and identical configurations reuse one ExtGState

Apply the returned ID with SetGraphicsState before drawing masked content, then apply a PDF_SOFT_MASK_NONE state to end the mask scope

A reset state requires CaptureID 0 and empty backdrop and transfer-function strings

The document version is raised to PDF 1.4, while PDF/A-1 and PDF/X-1 modes reject this operation

See also

SetGraphicsState, BeginFormXObject, SetCapturedPageTransparencyGroup, SetImageSoftMaskEx