Click or drag to resize

PdfiumFPDFTilingPattern_Create Method

Create a tiling pattern.

Namespace: Patagames.Pdf
Assembly: Patagames.Pdf (in Patagames.Pdf.dll) Version: 4.94.2704
Syntax
public static IntPtr FPDFTilingPattern_Create(
	IntPtr document,
	bool bColored,
	TilingType tilingType,
	FS_RECTF bbox,
	float xStep,
	float yStep,
	FS_MATRIX parentMatrix = null,
	FS_MATRIX formMatrix = null
)

Parameters

document  IntPtr
The handle to the PDF document.
bColored  Boolean
Flag indicating whether the given pattern is colored or not.
tilingType  TilingType
A code that controls adjustments to the spacing of tiles relative to the device pixel grid.
bbox  FS_RECTF
A rectangle in the pattern coordinate system giving the coordinates of the left, bottom, right, and top edges, respectively, of the pattern cell’s bounding box. These boundaries are used to clip the pattern cell.
xStep  Single
The desired horizontal spacing between pattern cells, measured in the pattern coordinate system.
yStep  Single
The desired vertical spacing between pattern cells, measured in the pattern coordinate system.
parentMatrix  FS_MATRIX  (Optional)
The transformation matrix of the parent content stream.
formMatrix  FS_MATRIX  (Optional)
The pattern matrix. If null, the identity matrix is used.

Return Value

IntPtr
Handle to the created tiling pattern; IntPtr.Zero if any error has occurred.
Remarks

Colored tiling pattern. The pattern's content stream specifies the colors used to paint the pattern cell. When the content stream begins execution, the current color is the one that was initially in effect in the pattern's parent content stream.

Uncolored tiling pattern. The pattern’s content stream does not specify any color information. Instead, the entire pattern cell is painted with a separately specified color each time the pattern is used. Essentially, the content stream describes a stencil through which the current color is to be poured. The content stream must not invoke operators that specify colors or other color-related parameters in the graphics state; otherwise, an error occurs. The content stream may paint an image mask, however, since it does not specify any color information.

Note that xStep and yStep may differ from the dimensions of the pattern cell implied by the bbox parameter. This allows tiling with irregularly shaped figures. xStep and yStep may be either positive or negative but not zero.

A pattern’s appearance is described with respect to its own internal coordinate system. Every pattern has a formMatrix, a transformation matrix that maps the pattern’s internal coordinate system to the default coordinate system of the pattern's parent content stream (the content stream in which the pattern is defined as a resource). The concatenation of the formMatrix with that of the parent content stream establishes the pattern coordinate space, within which all graphics objects in the pattern are interpreted.

See Also