Xojo Conferences
MBSOct2019CologneDE
XDCMarch2020NashvilleUS

DynaPDF Manual - Page 345

Previous Page 344   Index   Next Page 346

Function Reference
Page 345 of 770
GetColorSpace
Syntax:
SI32 pdfGetColorSpace(
const PPDF* IPDF) // Instance pointer
typedef enum
{
esDeviceRGB
= 0,
// Device color space
esDeviceCMYK = 1,
// Device color space
esDeviceGray = 2,
// Device color space
esCalGray
= 3,
// CIE-based color space
esCalRGB
= 4,
// CIE-based color space
esLab
= 5,
// CIE-based color space
esICCBased
= 6,
// ICC-based color space -> contains an ICC profile
esPattern
= 7,
// Special color space
esIndexed
= 8,
// Special color space
esSeparation = 9,
// Special color space
esDeviceN
= 10, // Special color space
esNChannel
= 11, // Special color space
esInitSpace
= -1
// Internal -> This value cannot occur.
}TExtColorSpace;
The function returns the active color space.
GetColorSpaceCount
Syntax:
SI32 pdfGetColorSpaceCount(
const PPDF* IPDF) // Instance pointer
The function returns the number of color space objects which are used in the current document.
Color spaces can be accessed with GetColorSpaceObj().
GetColorSpaceObj
Syntax:
LBOOL pdfGetColorSpaceObj(
const PPDF* IPDF)
// Instance pointer
UI32 Handle,
// Color space handle
struct TPDFColorSpaceObj* CS) // Structure to be filled
struct TPDFColorSpaceObj
{
TExtColorSpace Type;
TExtColorSpace Alternate; // Alternate or base space of Indexed or Pattern color spaces.
void* IAlternate; // Optional alternate color space.
BYTE* Buffer;
// ICC profile or color table of an Indexed color space.
UI32 BufSize;
// Buffer length in bytes.
float* BlackPoint; // CIE black point. If set, the array contains exactly 3 values.
float* WhitePoint; // CIE white point. If set, the array contains exactly 3 values.
float* Gamma;
// If set, one value per component.
float* Range;
// min/max per component or .a .b components of a Lab color space.
float* Matrix;
// XYZ matrix. If set, the array contains exactly 9 values.
UI32 NumInComponents;
// Number of input components.
UI32 NumOutComponents; // Number of output components.
UI32 NumColors;
// HiVal + 1. Indexed color space only.
BYTE* Colorants[32];
// Colorant names (Separation, DeviceN, and NChannel only).
 

Previous topic: GetCMapCount

Next topic: GetColorSpaceObjEx