Xojo Developer Conference
25/27th April 2018 in Denver.
MBS Xojo Conference
6/7th September 2018 in Munich, Germany.

DynaPDF Manual - Page 126

Previous Page 125   Index   Next Page 127

Function Reference
Page 126 of 750
AddMaskImage
Syntax:
LBOOL pdfAddMaskImage(
const PPDF* IPDF,
// Instance pointer
UI32 BaseImage,
// Image to which the mask should be added
const void* Buffer, // Image buffer
UI32 BufSize,
// Buffer size
SI32 Stride,
// Scanline length in bytes
UI32 BitsPerPixel,
// 1 and 8 bits per pixel are supported
UI32 Width,
// Image width
UI32 Height)
// Image height
The function adds an image mask to a base image. If BitsPerPixel is 1, the image is used as an image
mask or stencil mask. The image mask specifies which areas on the page should be painted and
which should be masked out (left unchanged).
If BitsPerPixel is 8, the image is used as a soft mask. A soft mask represents an alpha channel that
ranges from 0 (transparent) through 255 (opaque).
The base and mask image need not to have the same width and height since both images are scaled
into the same destination rectangle or parallelogram so that the boundaries coincide. This makes it
possible to use a higher resolution mask with a lower resolution base image or vice versa.
If the image contains already a mask image then this mask will be replaced with the new one.
Return values:
If the function succeeds the return value is 1. If the function fails the return value is 0.
AddObjectToLayer
Syntax:
LBOOL pdfAddObjectToLayer(
const PPDF* IPDF,
// Instance pointer
UI32 OCG,
// Must be a OCG or OCMD handle
TOCObject ObjType, // See below
UI32 Handle)
// Object handle
typedef enum
{
ooAnnotation,
ooField,
ooImage,
ooTemplate
}TOCObject;
The function adds an object to an Optional Content Group (OCG) or Optional Content Membership
dictionary (OCMD). See also CreateOCG() and CreateOCMD().
 

Previous topic: AddLayerToDisplTree

Next topic: AddOCGToAppEvent