SeparationColorSpace Class Documentation

classSeparationColorSpace : ColorSpace

Namespace:datalogics_interface

Inherits from:
ColorSpace

Detailed Description

Colorants in a separation color space are also sometimes referred to as spot colorants. The device displaying or printing the PDF document will supply an appropriate color based on the colorant included in the separation color space.

Constructor & Destructor Documentation

SeparationColorSpace

SeparationColorSpace(const std::string &name, const ColorSpace &alternate, const Function &tint_transform)

Parameters

name: const std::string &

the name of the colorant that the Separation space is intended to represent, or All, or None

alternate: const ColorSpace &

the alternate color space, which can be any device or CIE-based color space but not another special color space (Pattern, Indexed, Separation, or DeviceN).

tint_transform: const Function &

function, called with the tint value and returning the corresponding color component values. That is, the number of components and the interpretation of their values depend on the alternate color space.

Create a separation color space.

SeparationColorSpace

SeparationColorSpace(Page &page, const Ink &ink)

Parameters

page: Page &

the name of the colorant that the Separation space is intended to represent, or All, or None

ink: const Ink &

the alternate color space, which can be any device or CIE- based color space but not another special color space (Pattern, Indexed, Separation, or DeviceN).

Create a separation color space.

Member Function Documentation

get_alternate

Returns:

The alternate color space.

The alternate color space can be any device or CIE-based color space but not another special color space (Pattern, Indexed, Separation, or DeviceN).

get_function

Returns:

std::unique_ptr< Function >

A function, called with the tint value and returning the corresponding color component values. That is, the number of components and the interpretation of their values depend on the alternate color space.

get_name

std::stringget_name()

Returns:

std::string

The name of the color space. A named color space may be named something like DeviceRGB. More complicated color spaces may have a name like Indexed or ICCBased.

get_num_components

intget_num_components()

Returns:

The number of color components.

For example, DeviceGray has 1 component, DeviceRGB has 3, and DeviceCMYK has 4.

get_pdf_object

Returns:

The PDFObject associated with the color space.

Get the PDFObject associated with the color space. This may be a PDFName, PDFDict, PDFStream, or PDFArray.

get_separation_name

std::stringget_separation_name()

Returns:

The separation colorant name as a string.

The name of the colorant that the Separation space is intended to represent, or All, or None.

get_separation_name_array

std::vector< unsigned char >get_separation_name_array()

Returns:

A byte array containing the raw separation name.

The name of the colorant that the Separation space is intended to represent, or All, or None. This property is suitable for retrieving the name when the SeparationName cannot be retrieved as a string (for example, when the name contains non-Unicode characters).

operator==

booloperator==(const ColorSpace &other)

Parameters

other: const ColorSpace &

The ColorSpace to compare against.

Returns:

true if the two color spaces are equal, false otherwise.

This works best for named color spaces.

More complex color spaces (such as ICCBased) do not support equality testing and will always return false.

to_string

std::stringto_string()

Returns:

A string describing this ColorSpace.

Convert a ColorSpace to a string representation.