Xojo Conferences
XDCMay2019MiamiUSA
MBSOct2019CologneDE

DynaPDF Manual - Page 718

Previous Page 717   Index   Next Page 719

Function Reference
Page 718 of 766
In some workflows, however, pages are pre-separated before generating the PDF file. In a pre-
separated PDF file, the separations for a page are described as separate page objects, each painting
only a single colorant (usually specified in the DeviceGray color space). When this is done,
additional information is needed to identify the actual colorant associated with each separation and
to group together the page objects representing all the separations for a given page. This information
is contained in the separation info of each page object.
Return values:
If the function succeeds the return value is 1. If the function fails the return value is 0.
SetStrokeColor
Syntax:
LBOOL pdfSetStrokeColor(
const PPDF* IPDF, // Instance pointer
UI32 Color)
// Color value defined in the current color space
The function sets the stroke color. The stroke color is also used by text objects if the text rendering
mode is dmStroke or dmFillStroke (see SetTextDrawMode() for further information).
The color value must be defined in the current color space. CMYK colors can be constructed with the
macro PDF_CMYK() or with the function CMYK() which is available in most programming
languages. RGB colors can be constructed with the macro PDF_RGB() or with the function RGB()
which is available in most programming languages.
If the color space contains more than 4 color components use SetStrokeColorEx() instead.
Return values:
If the function succeeds the return value is 1. If the function fails the return value is 0.
SetStrokeColorEx
Syntax:
LBOOL pdfSetStrokeColorEx(
const PPDF* IPDF,
// Instance pointer
const BYTE* Color,
// Color to be set
UI32 NumComponents) // Number of componnents
The function sets the stroke color. The color must be defined as an array of bytes in the logical order
of the color space. For example, if the color space is DeviceRGB the array must specify the color
values of the red, green, and blue components in that order. The number of components must be
equal to the one of the corresponding 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++):
 

Previous topic: SetSeparationInfo

Next topic: SetStrokeColorSpace