DL Logo

PDEColorSpace Typedefs

PDEBlackPointFlt

Header: PEExpT.h:2153

Description

A structure describing a black point in a calibrated color space.

Related Methods

Syntax

typedef PDEXYZColorFlt PDEBlackPointFlt;

Used In

PDEColorSpace

Header: PEExpT.h:322

Description

A reference to a color space used on a page in a PDF file. The color space is part of the graphics state attributes of a PDEElement.

Related Methods

Syntax

typedef struct _t_PDEColorSpace *PDEColorSpace;

Returned From

Used By

Used In

PDEPatternColorSpace

Header: PEExpT.h:2228

Description

A PDEColorSpace that describes a Pattern color space.

Related Methods

Syntax

typedef PDEColorSpace PDEPatternColorSpace;

Used In

PDEWhitePointFlt

Header: PEExpT.h:2147

Description

A structure describing a white point in a calibrated color space.

Related Methods

Syntax

typedef PDEXYZColorFlt PDEWhitePointFlt;

Used In

PDEColorSpace Structures

PDEColorRangeFlt

Header: PEExpT.h:2132

Syntax

struct PDEColorRangeFlt {
float min;
float max;
} PDEColorRangeFlt;

Used In

PDEColorSpaceStruct

Header: PEExpT.h:2337

Description

A color space structure for PDEColorSpaceCreate(). See "Color Spaces" in the ISO 32000-1:2008, Document Management-Portable Document Format-Part 1: PDF 1.7, section 8.6 page 138.

You can find this document on the web store of the International Standards Organization (ISO).

Syntax

union PDEColorSpaceStruct {
PDEGrayCalFlt *calGray;
PDERGBCalFlt *calRGB;
PDEPatternColorSpace patternbase;
} PDEColorSpaceStruct;

Used By

PDEXYZColorFlt

Header: PEExpT.h:2137

Syntax

struct PDEXYZColorFlt {
float x;
float y;
float z;
} PDEXYZColorFlt;

Used In

_t_PDEDeviceNColorData

Header: PEExpT.h:2305

Description

A structure describing a DeviceRGB or DeviceCMYK color space. To learn about color spaces, see the ISO 32000-1:2008, Document Management-Portable Document Format-Part 1: PDF 1.7, section 9.9, page 155. You can find this document on the web store of the International Standards Organization (ISO).

Related Methods

Syntax

struct _t_PDEDeviceNColorData {
ASSize_t size;
The size of the data structure. It must be set to sizeof(PDEDeviceNColorData).
ASAtom *names;
The names of the colorants.
ASUns32 nNames;
The number of colorants.
The alternate color space.
CosObj tintTransform;
The tintTransform dictionary or function. See the "Special Color Spaces" section in the ISO 32000-1:2008, Document Management-Portable Document Format-Part 1: PDF 1.7, section 8.6.6, page 155.
} PDEDeviceNColorData;

Used In

_t_PDEGrayCalFlt

Header: PEExpT.h:2162

Description

A structure describing a CalGray color space.

Default value: PDEGrayCalFlt calGray = {{0, 0, 0}, {0, 0, 0}, 1};

Related Methods

Syntax

struct _t_PDEGrayCalFlt {
PDEWhitePointFlt whitePoint;
PDEBlackPointFlt blackPoint;
float gamma;
} PDEGrayCalFlt;

Used In

_t_PDEICCBasedColorData

Header: PEExpT.h:2231

Description

An ICC-based color space.

Syntax

struct _t_PDEICCBasedColorData {
ASSize_t size;
Set the size to sizeof(PDEICCColorData).
ASStm iccstream;
A stream containing an ICC Profile.
ASUns32 nComps;
The number of color components ( 1, 3, or 4).
(Optional) An alternate color space.
} PDEICCBasedColorData;

Used In

_t_PDEIndexedColorData

Header: PEExpT.h:2250

Description

A structure describing an indexed color space.

Related Methods

Syntax

struct _t_PDEIndexedColorData {
ASSize_t size;
Set the size to sizeof(PDEIndexedColorData).
PDEColorSpace baseCs;
The base color space.
ASUns16 hival;
The highest color value.
char *lookup;
Indexed color lookup data.
ASUns32 lookupLen;
The number of bytes in the lookup data.
} PDEIndexedColorData;

Used In

_t_PDELabCalFlt

Header: PEExpT.h:2210

Description

A structure describing a Lab color space.

Default value: {{0, 0, 0}, {0, 0, 0}, {-100, 100}, {-100, 100}};

Related Methods

Syntax

struct _t_PDELabCalFlt {
PDEWhitePointFlt whitePoint;
PDEBlackPointFlt blackPoint;
PDEColorRangeFlt rangeA, rangeB;
} PDELabCalFlt;

Used In

_t_PDERGBCalFlt

Header: PEExpT.h:2182

Description

A structure describing a CalRGB color space. It is the same as AGMRGBCalFlt (it is only available as part of the PDF Library SDK).

Default value: {{0, 0, 0}, {0, 0, 0}, 1, 1, 1, {1, 0, 0, 0, 1, 0, 0, 0, 1}};

Related Methods

Syntax

struct _t_PDERGBCalFlt {
PDEWhitePointFlt whitePoint;
PDEBlackPointFlt blackPoint;
float redGamma;
float greenGamma;
float blueGamma;
float matrix [9];
} PDERGBCalFlt;

Used In

_t_PDESeparationColorData

Header: PEExpT.h:2276

Description

A structure describing a separation color space. To learn about color spaces, see the ISO 32000-1:2008, Document Management-Portable Document Format-Part 1: PDF 1.7, section 9.9, page 155. You can find this document on the web store of the International Standards Organization (ISO).

Related Methods

Syntax

struct _t_PDESeparationColorData {
ASSize_t size;
The size of the data structure. It must be set to sizeof(PDESeparationColorData).
ASAtom name;
The name of the separation or colorant.
The alternate color space.
CosObj tintTransform;
The tintTransform dictionary or function. See the "Special Color Spaces" section in the ISO 32000-1:2008, Document Management-Portable Document Format-Part 1: PDF 1.7, section 8.6.6, page 155.
} PDESeparationColorData;

Used In

PDEColorSpace Functions

PDEColorSpaceCreate

Header: PEWProcs.h:1449

Description

Creates a new color space object of the specified type.

Call PDERelease() to dispose of the returned color space object when finished with it.

Syntax

PDEColorSpace PDEColorSpaceCreate(ASAtom family, PDEColorSpaceStruct *csStruct);

Parameters

family
IN/OUT Supports all PDF 1.3 color spaces, which include:
Type of names
Names
Device-dependent names
  • DeviceCMYK
  • DeviceGray
  • DeviceN
  • DeviceRGB
  • Device-independent names

  • CalGray
  • CalRGB
  • Lab
  • ICCBased
  • Special names

  • Indexed
  • Pattern
  • Separation
  • csStruct
    IN/OUT Data for the type of color space you want to create.

    Returns

    The newly created color space object.

    Exceptions

    PDEColorSpaceCreateFromCosObj

    Header: PEWProcs.h:968

    Description

    Creates a new color space object from a Cos object.

    Call PDERelease() to dispose of the returned color space object when finished with it.

    Syntax

    PDEColorSpace PDEColorSpaceCreateFromCosObj(IN const CosObj *cosObjP);

    Parameters

    cosObjP
    IN/OUT Supports all PDF 1.3 color spaces, which include:
    Type of names
    Names
    Device-dependent names
  • DeviceCMYK
  • DeviceGray
  • DeviceN
  • DeviceRGB
  • Device-independent names

  • CalGray
  • CalRGB
  • Lab
  • ICCBased
  • Special names

  • Indexed
  • Pattern
  • Separation
  • Returns

    The newly created color space object.

    Exceptions

    PDEColorSpaceCreateFromName

    Header: PEWProcs.h:941

    Description

    Creates a new color space object.

    Call PDERelease() to dispose of the returned color space object when finished with it.

    Syntax

    PDEColorSpace PDEColorSpaceCreateFromName(IN ASAtom name);

    Parameters

    name
    IN/OUT The ASAtom for the name of the color space created. The name must be one of the following: DeviceCMYK, DeviceGray, or DeviceRGB.

    Returns

    The newly created color space object.

    Exceptions

    PDEColorSpaceCreateInCosDoc

    Header: PEWProcs.h:3105

    Description

    Creates a color space object like PDEColorSpaceCreate(), except that the client can specify the CosDoc in which the color space object is created.

    Call PDERelease() to dispose of the returned color space object when finished with it.

    Syntax

    PDEColorSpace PDEColorSpaceCreateInCosDoc(IN ASAtom family, IN PDEColorSpaceStruct *csStruct, IN CosDoc cosDoc);

    Parameters

    family
    IN/OUT Supports all PDF 1.3 color spaces, which include:
    Type of names
    Names
    Device-dependent names
  • DeviceCMYK
  • DeviceGray
  • DeviceN
  • DeviceRGB
  • Device-independent names

  • CalGray
  • CalRGB
  • Lab
  • ICCBased
  • Special names

  • Indexed
  • Pattern
  • Separation
  • csStruct
    IN/OUT Data for the type of color space you want to create.
    cosDoc
    IN/OUT The document in which to put the Cos representation of resource. It may be NULL.

    Returns

    The newly created color space object.

    Exceptions

    PDEColorSpaceGetBase

    Header: PERProcs.h:1173

    Description

    Gets the name of the base color space. This is a helper routine for indexed color spaces.

    Call this method to obtain the base color space and color values for an uncolored pattern in PDFEdit.

    Related Methods

    PDEColorSpaceGetBaseNumComps Note that the base color values are in the color array in the PDEColorValue field for stroke and fill of a PDEGraphicStateP. Or, they are in the colorObj2 object if the base color space is DeviceN. To get the color values, a client gets the base color space, determines the type and number of components of the value, and looks them up in the PDEColorValue field.

    Syntax

    ASAtom PDEColorSpaceGetBase(IN PDEColorSpace colorSpace);

    Parameters

    colorSpace
    The base color space.

    Returns

    The ASAtom for the name of the base color space. Use ASAtomGetString() to obtain a C string for the ASAtom.

    Exceptions

    PDEColorSpaceGetBaseNumComps

    Header: PERProcs.h:1465

    Description

    Gets the number of components in the base color space of an indexed color space.

    For example, for [/ Indexed / DeviceRGB...], the number of components is 3.

    Syntax

    ASInt32 PDEColorSpaceGetBaseNumComps(IN PDEColorSpace colorSpace);

    Parameters

    colorSpace
    IN/OUT The indexed color space.

    Returns

    The number of components in colorSpace.

    Exceptions

    PDEColorSpaceGetCTable

    Header: PERProcs.h:1205

    Description

    Gets the component information for an indexed color space.

    Syntax

    void PDEColorSpaceGetCTable(IN PDEColorSpace colorSpace, OUT ASUns8 *colorTableP);

    Parameters

    colorSpace
    IN/OUT The color space whose component information table is obtained.
    colorTableP
    IN/OUT (Filled by the method) The color lookup table, which is numComps * (hiVal + 1) bytes long, where numComps is the number of components in the base colorSpace. Each entry in the table contains numComps bytes, and the table is indexed from 0 to hiVal, where hiVal is the highest index in the color table. The table is indexed from 0 to hival, thus the table contains hival + 1 entries.

    Exceptions

    PDEColorSpaceGetCosObj

    Header: PERProcs.h:1120

    Description

    Gets the CosObj representation of the color space object.

    For image masks, use PDEElementGetGState() to obtain color information.

    Syntax

    void PDEColorSpaceGetCosObj(IN PDEColorSpace colorSpace, OUT CosObj *cosObjP);

    Parameters

    colorSpace
    IN/OUT The color space whose Cos object is obtained.
    cosObjP
    IN/OUT (Filled by the method) The Cos object for the color space.

    Returns

    The Cos object for colorSpace. Any color space that is in the Resources dictionary of the page is returned as a Cos object.

    Exceptions

    PDEColorSpaceGetHiVal

    Header: PERProcs.h:1186

    Description

    Gets the highest index for the color lookup table for an indexed color space. Since the color table is indexed from zero to hiVal, the actual number of entries is hiVal + 1.

    Syntax

    ASInt32 PDEColorSpaceGetHiVal(IN PDEColorSpace colorSpace);

    Parameters

    colorSpace
    IN/OUT An indexed color space.

    Returns

    The highest index ( hiVal) in the color lookup table.

    Exceptions

    PDEColorSpaceGetName

    Header: PERProcs.h:1102

    Description

    Gets the name of a color space object.

    Syntax

    ASAtom PDEColorSpaceGetName(IN PDEColorSpace colorSpace);

    Parameters

    colorSpace
    IN/OUT A color space object.

    Returns

    The color space object's name. It supports all PDF 1.3 color spaces, which include:
    Type of names
    Names
    Device-dependent names
  • DeviceCMYK
  • DeviceGray
  • DeviceN
  • DeviceRGB
  • Device-independent names

  • CalGray
  • CalRGB
  • Lab
  • ICCBased
  • Special names

  • Indexed
  • Pattern
  • Separation
  • Exceptions

    PDEColorSpaceGetNumComps

    Header: PERProcs.h:1149

    Description

    Calculates the number of components in a color space.

    Syntax

    ASInt32 PDEColorSpaceGetNumComps(IN PDEColorSpace colorSpace);

    Parameters

    colorSpace
    IN/OUT A color space object.

    Returns

    The number of components in colorSpace:
    Color space
    Return value
    DeviceGray
    1
    CalGray
    1
    Separation
    1
    DeviceRGB
    3
    CalRGB
    3
    DeviceCMYK
    4
    Lab
    4
    DeviceN
    The number of components dependent on the specific color space object.
    ICCBased
    The number of components dependent on the specific color space object.
    Indexed
    1

    Call PDEColorSpaceGetBaseNumComps() to get the number of components in the base color space.

    Exceptions

    PDEColorSpaceGetStruct

    Header: PERProcs.h:3003

    Description

    Retrieves a PDEColorSpaceStruct from a PDEColorSpace. It supports all PDF version 1.3 color spaces except the Pattern color space.

    It is the responsibility of the caller to free the PDEColorSpaceStruct and the underlying allocations.

    Related Methods

    Syntax

    void PDEColorSpaceGetStruct(IN PDEColorSpace cs, OUT PDEColorSpaceStruct *pdeColorSpaceStruct);

    Parameters

    cs
    IN/OUT The PDEColorSpace for which the structure is required.
    pdeColorSpaceStruct
    IN/OUT The PDEColorSpaceStruct created for the color space.

    Exceptions