THotPDF.RegisterTilingPattern Method
Registers a reusable coloured or uncoloured tiling pattern and returns its page resource name
Declaration
function RegisterTilingPattern(BBoxLLx, BBoxLLy, BBoxURx,
BBoxURy: Single; XStep, YStep: Single; const Content: AnsiString;
Colored: boolean= True): AnsiString; overload;
function RegisterTilingPattern(BBoxLLx, BBoxLLy, BBoxURx,
BBoxURy: Single; XStep, YStep: Single; const Content: AnsiString;
Colored: boolean; TilingType: THPDFTilingPatternType;
const PatternMatrix: THPDFAffineMatrix): AnsiString; overload;
Unit
HPDFDoc
Parameters
| Name | Purpose |
|---|---|
BBoxLLx, BBoxLLy | Finite lower-left coordinates of the pattern cell bounding box |
BBoxURx, BBoxURy | Finite upper-right coordinates, each greater than its lower-left counterpart |
XStep, YStep | Finite non-zero signed distances between adjacent pattern cells |
Content | PDF content operators executed independently inside every pattern cell |
Colored | True emits /PaintType 1; False emits /PaintType 2 and takes its tint from the matching page pattern-colour API |
TilingType | Selects constant spacing, no cell distortion, or faster constant spacing through THPDFTilingPatternType |
PatternMatrix | Finite invertible THPDFAffineMatrix mapping pattern coordinates into the parent content stream's default coordinate system |
Return value
Returns the stable resource name used by SetFillPattern, SetStrokePattern, or their uncoloured RGB, Gray, and CMYK variants
Usage notes
- The legacy overload uses
pttConstantSpacingand an identity pattern matrix pttConstantSpacingpreserves device-pixel spacing with at most one pixel of cell distortion, whilepttNoDistortionpreserves the cell shape and adjusts individual tile originspttConstantSpacingFastpreserves device-pixel spacing and permits the renderer to favour faster placement over minimum distortion- Negative steps are valid and repeat cells in the opposite pattern-space direction
- For uncoloured patterns, cell colour operators are ignored and the selected base tint applies to both fill and stroke operations inside the cell
- The renderer isolates each cell path and clips it to
BBox, supports nested pattern resources, and bounds recursion and executed tile count