DynaPDF Manual - Page 174

Previous Page 173   Index   Next Page 175

Function Reference
Page 174 of 839
allowed, only 1 bit images can be used. This type of pattern can be painted in a user defined color
that can be applied with ApplyPattern().
The color information of a colored tiling pattern is fixed, it can not be changed.
A pattern can be used like a color. It is not recommended to save the graphics state before using a
pattern. A pattern is active as long as the used color is changed by SetFillColor() or SetStrokeColor().
See ApplyPattern() for an example application.
The current graphics state is saved entirely before the pattern will be entered. This graphics state is
restored when the pattern is closed with EndPattern(). That means, the current font, line width, fill
color and so on are all restored to its values before entering the pattern.
Remarks:
Patterns are invisible as long as they are not applied by the function ApplyPattern(). The initial
graphic state defines a zero line width in Acrobat 5. If a pattern should contain any line art or
stroked paths, the line width must be explicitly set before an object is drawn. If the line width is not
set, the results can vary between different Acrobat versions. In general a pattern should not contain
very complex objects to improve graphics speed.
Return values:
If the function succeeds, the return value is a pattern handle, a value greater or equal zero. If the
function fails the return value is a negative error code.
Pattern types:
Colored Tiling Pattern
Uncolored Tiling Pattern
 

Previous topic: BeginPattern, Colored Tiling Patterns, Uncolored Tiling Patterns

Next topic: BeginTemplate