DynaPDF Manual - Page 307

Previous Page 306   Index   Next Page 308

Function Reference
Page 307 of 839
SI32 pdfCreateStdPattern(
const PPDF* IPDF,
// Instance pointer
TStdPattern Pattern, // Kind of pattern
double LineWidth,
// Line width to draw the pattern
double Distance,
// Distance between the lines
UI32 LineColor,
// Color of the lines
UI32 BackColor)
// Background color or NO_COLOR if transparent
typedef enum
spHorizontal, /* ----- */
/* ||||| */
/* \\\\\ */
/* ///// */
/* +++++ */
/* xxxxx */
This function creates a hatch pattern. Several types of hatch pattern can be created with this
function. The line width, line distance, and line color can be set individually. If the pattern should be
transparent set the background color to NO_COLOR.
The function creates a colored tiling pattern. See BeginPattern() for further information.
A pattern can be used like a color, it is not required to save the graphics state before applying a
pattern. A pattern remains active until the corresponding color is changed with SetFillColor() or
Patterns are invisible as long as they are not applied by the function ApplyPattern().
Return values:
If the function succeeds the return value is the pattern handle, a value greater or equal zero. If the
function fails the return value is a negative error code.
Example (C):
// First we declare an error callback function.
SI32 PDF_CALL PDFError(const void* Data, SI32 ErrCode, const char*
ErrMessage, SI32 ErrType)
printf("%s\n", ErrMessage);
return 0;

Previous topic: Possible rendering issues, How to activate a soft mask?

Next topic: CreateStructureTree