ColorSpace Class Documentation

classColorSpace

Namespace:datalogics_interface

Derived classes:
CalGrayColorSpace, CalRGBColorSpace, DeviceNColorSpace, ICCBasedColorSpace, IndexedColorSpace, LabColorSpace, NamedColorSpace, SeparationColorSpace

Detailed Description

Base class for all color spaces.

Uses types

Constructor & Destructor Documentation

~ColorSpace

~ColorSpace()

Member Function Documentation

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.

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.