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

DynaPDF Manual - Page 623

Previous Page 622   Index   Next Page 624

Function Reference
Page 623 of 750
SetColSortField
Syntax:
LBOOL pdfSetColSortField(
const PPDF* IPDF,
// Instance pointer
UI32 ColField,
// Handle of a collection field
LBOOL AscendingOrder) // If true, sort the list in ascending order
The function sets the collection field that should be used to sort the list of embedded files.
Return values:
If the function succeeds the return value is 1. If the function fails the return value is 0.
SetColorMask
Syntax:
LBOOL pdfSetColorMask(
const PPDF* IPDF, // Instance pointer
UI32 ImageHandle, // Image handle
SI32* Mask,
// Mask values (min / max per component) or NULL
UI32 Count)
// Number of mask values
The functions sets or overrides the color mask of an image. The parameter ImageHandle must be a
valid handle of an image that should get the mask. The bit depth of the image must be higher than 1.
The parameter Mask must be an array of min / max pairs for every color channel. Each integer must
be in the range 0 to 2BitsPerComponent -1.
If Mask is NULL or if Count is zero an existing color mask will be deleted if any. Count holds the full
length of the array which must be 2 x NumComponents.
Remarks:
Color Key Masking depends on exact color values. Since JPEG or JPEG 2000 compressed images
produce interpolated colors, these filters should not be used with a color mask. To achieve
predictable results use Flate compression instead (see SetCompressionFilter()).
Return values:
If the function succeeds the return value is 1. If the function fails the return value is 0.
SetColors
Syntax:
LBOOL pdfSetColors(
const PPDF* IPDF, // Instance pointer
UI32 Color)
// Color value defined in the current color space
The function sets the fill and stroke color. The parameter Color must be defined in the current color
space. For example, if the current color space is DeviceGray the color value must be in the range 0 to
255. CMYK colors can be constructed with the macro PDF_CMYK() or with the function CMYK()
 

Previous topic: SetColDefFile

Next topic: SetCompressionFilter