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

DynaPDF Manual - Page 648

Previous Page 647   Index   Next Page 649

Function Reference
Page 648 of 750
If the corresponding color space contains more than four color components use SetFillColorEx()
instead.
The function requires an open page, template, or pattern.
Return values:
If the function succeeds the return value is 1. If the function fails the return value is 0.
SetFillColorEx
Syntax:
LBOOL pdfSetFillColorEx(
const PPDF* IPDF,
// Instance pointer
const BYTE* Color,
// Color to be set
UI32 NumComponents) // Number of componnents
The function sets the fill color. The color must be defined as an array of bytes in the logical order of
the color space. The number of components must match the number of components of the
underlying color space.
Lab colors can be defined as signed char as usual. Make a typecast to BYTE* when passing the color
to the function. See CreateCIEColorSpace() for further information.
Example (C/C++):
char labColor[3] = {50, -34, 77}; // L, *a, *b
pdfSetFillColor(pdf, (BYTE*)labColor, 3);
Return values:
If the function succeeds the return value is 1. If the function fails the return value is 0.
SetFillColorF
Syntax:
LBOOL pdfSetFillColorF(
const PPDF* IPDF,
// Instance pointer
const float* Color, // Array of float values
UI32 NumComponents) // Must match the underlying color space
The function sets the current fill color as an array of float values. The components of non-Lab color
spaces must be in the range from 0 through 1. The *a and *b components of a Lab color space are
typically in a range ­128 though 127. The *L component ranges from 0 through 100.
The number of components must match the number of components of the underlying color space.
Return values:
If the function succeeds the return value is 1. If the function fails the return value is 0.
 

Previous topic: SetFillColor

Next topic: SetFloatPrecision