DynaPDF Manual - Page 702

Previous Page 701   Index   Next Page 703

Function Reference
Page 702 of 839
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()
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.
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.
SetColorSpace
Syntax:
LBOOL pdfSetColorSpace(
const PPDF* IPDF,
// Instance pointer
TPDFColorSpace ColorSpace) // see below
typedef enum
{
csDeviceRGB
= 0,
csDeviceCMYK = 1,
csDeviceGray = 2
}TPDFColorSpace;
The function activates a device color space in the graphics state. All color values must be defined in
the current color space. Images or EMF graphics are automatically converted to the current color
space. The default color conversion rules can be modified with the function SetGStateFlags().
Extended color spaces can be set with SetExtColorSpace(), SetExtFillColorSpace(), and
SetExtStrokeColorSpace().
Return values:
If the function succeeds the return value is 1. If the function fails the return value is 0.
 

Previous topic: SetColSortField, SetColorMask

Next topic: SetCompressionFilter, SetCompressionLevel