THotPDF.RegisterImageTilingPattern Method
Registers a coloured PDF tiling pattern whose cell reuses one existing image XObject across one or more independently clipped affine placements
Declaration
function RegisterImageTilingPattern(ImageIndex: Integer; BBoxLLx,
BBoxLLy, BBoxURx, BBoxURy: Single; XStep, YStep: Single;
const Placements: THPDFImageTilingPlacements;
TilingType: THPDFTilingPatternType;
const PatternMatrix: THPDFAffineMatrix): AnsiString; overload;
function RegisterImageTilingPattern(ImageIndex: Integer; BBoxLLx,
BBoxLLy, BBoxURx, BBoxURy: Single; XStep, YStep: Single;
const Placements: THPDFImageTilingPlacements;
TilingType: THPDFTilingPatternType;
const PatternMatrix: THPDFAffineMatrix;
UseImageSoftMask: boolean): AnsiString; overload;
Unit
HPDFDoc
Parameters
ImageIndexselects an image previously returned byAddImageor an equivalent image-registration APIBBoxLLx,BBoxLLy,BBoxURx, andBBoxURydefine the finite positive pattern-cell boundsXStepandYStepdefine finite non-zero cell spacingPlacementssupplies 1 to 1024 finite invertible matrices with finite positive clipping rectanglesTilingTypeselects the PDF tiling placement rulePatternMatrixmaps pattern coordinates into the parent content stream default coordinate systemUseImageSoftMaskreuses the selected image's grayscale/SMaskXObject as the cell image
Behaviour
The method emits one image XObject resource in the pattern dictionary and invokes it from every placement, so repeated and mirrored cells do not duplicate image bytes
Each placement is isolated by q and Q, clipped before its matrix is concatenated, and serialized with locale-independent PDF numbers
The soft-mask overload links one existing alpha image under a stable SMIm resource name, allowing repeated and reflected alpha cells without duplicating or decoding image bytes
The method raises ERangeError for invalid image indices, placement counts, clipping rectangles, matrices, bounds, steps, or pattern matrices
Return value
Returns the stable pattern resource name for THPDFPage.SetFillPattern or THPDFPage.SetStrokePattern
Related APIs
THPDFImageTilingPlacement · THotPDF.RegisterTilingPattern · THPDFPage.SetFillPattern