BeginTilingPattern

Vector graphics, Page layout

Description

Starts a temporary tiling-pattern drawing surface with the requested pattern name, width, and height

While the build is active, normal drawing calls write to the temporary page selected by this function

Finish the build with EndTilingPattern to register the pattern, or call CancelTilingPattern to discard the temporary drawing surface

Syntax

Delphi

Function TPDFlib.BeginTilingPattern(Const PatternName: WideString; Width, Height: Double): Integer;

ActiveX

Function PDFlib::BeginTilingPattern(PatternName As String, Width As Double, Height As Double) As Long

DLL

int DLBeginTilingPattern(int InstanceID, const wchar_t * PatternName, double Width, double Height);

Parameters

PatternNameName used later by SetFillTilingPattern, SetLineTilingPattern, or SetTextTilingPattern
WidthThe pattern cell width in PDF units
HeightThe pattern cell height in PDF units

Return values

0The name or dimensions were invalid, a reusable-surface build was already active, the name already exists, or the temporary drawing surface could not be created
1The tiling-pattern drawing surface was created and selected

Remarks

Do not select another page or document until the build is ended or canceled; drawing commands should target the temporary page selected by BeginTilingPattern

The registered pattern can be reused across pages through SetFillTilingPattern, SetLineTilingPattern, and SetTextTilingPattern

See also

EndTilingPattern, CancelTilingPattern, SetFillTilingPattern, NewTilingPatternFromCapturedPage