THotPDF.RegisterLuminositySoftMaskState Method

Builds a bounded DeviceGray transparency-group Form XObject and returns the ExtGState resource name that applies the Form as a luminosity soft mask

Declarations

function RegisterLuminositySoftMaskState(BBoxLLx, BBoxLLy,
  BBoxURx, BBoxURy: Single; const Content: AnsiString): AnsiString; overload;

function RegisterLuminositySoftMaskState(BBoxLLx, BBoxLLy,
  BBoxURx, BBoxURy: Single; const Content: AnsiString;
  const PatternNames: array of AnsiString;
  const ImageResources: array of THPDFFormImageResource): AnsiString; overload;

Parameters

Behaviour

The generated Form declares /Group << /S /Transparency /CS /DeviceGray /I true >> and the generated mask dictionary uses /S /Luminosity with a black /BC [0] backdrop

Alpha sources must be painted as greyscale values before registration, so the PDF luminosity operation reproduces alpha rather than deriving opacity from an RGB colour's visual brightness

Patterns and image XObjects are linked into the Form resource dictionary without duplicating their encoded streams

The method requires PDF 1.4 transparency, rejects PDF/A-1 output and validates all bounds, resource counts, names, indices and soft-mask links before allocating the Form

Return value

Returns a stable ExtGState resource name for THPDFPage.SetGraphicsState, or an empty string when the configured PDF version policy declines PDF 1.4

Related APIs

THPDFFormImageResource · THotPDF.RegisterSoftMaskState · THotPDF.RegisterImageTilingPattern