Xojo Conferences
XDCMay2019MiamiUSA
MBSOct2019CologneDE

DynaPDF Manual - Page 137

Previous Page 136   Index   Next Page 138

Function Reference
Page 137 of 766
ApplyAppEvent
Syntax:
LBOOL pdfApplyAppEvent(
const PPDF* IPDF,
// Instance pointer
TOCAppEvent Event, // Event that should be applied
LBOOL SaveResult)
// If true, the new state will be stored in the file
typedef enum
{
aeExport = 1,
aePrint
= 2,
aeView
= 4
}TOCAppEvent;
The visibility state of optional content groups (OCGs) can be dynamically changed in application
events like Export, View, or Print. DynaPDF loads the view state when rendering PDF pages by
default.
The function can be used to apply the visibility state of another event if necessary. The result can
optionally be stored in the PDF file but note that this has only an effect in PDF viewers which
support layers but no application events since the events will not be deleted from the PDF file. It is
also possible to delete the events with DeleteAppEvents().
Return values:
If the function succeeds the return value is 1. If the function fails the return value is 0.
ApplyPattern
Syntax:
SI32 pdfApplyPattern(
const PPDF * IPDF,
// Instance pointer
SI32 PattHandle,
// Handle of the pattern
TColorMode ColorMode, // Color mode (fill or stroke color or both)
UI32 Color)
// uncolored patterns only
typefed enum
{
cmFill,
// use the pattern as fill color
cmStroke,
// use the pattern as stroke color
cmFillStroke // use the pattern as fill and stroke color
}TColorMode;
The function sets a tiling pattern as current fill, stroke or fill and stroke color. Two types of patterns
are supported; colored tiling patterns which contain their own color information and uncolored
tiling patterns which can be used with a user defined color.
The parameter PattHandle must be a valid pattern handle that was returned by BeginPattern() or
CreateStdPattern(). The parameter Color is ignored for colored tiling patterns. Uncolored tiling
patterns are applied like a mask in the user defined color. The color must be defined in the current
color space.
 

Previous topic: Append

Next topic: ApplyShading