LabColorSpace Class Documentation
classLabColorSpace : ColorSpaceNamespace:datalogics_interface
- Inherits from:
ColorSpace
Detailed Description
In this type of space, A, B, and C represent the L*, a*, and b* components of a CIE 1976 L*a*b* space. The range of the first (L*) component is always 0 to 100; the ranges of the second and third (a* and b*) components are defined by the Range.
Uses types
Constructor & Destructor Documentation
LabColorSpace
LabColorSpace(const std::vector< double > &white_point)Parameters
white_point: const std::vector< double > &An array of three numbers specifying the tristimulus value, in the CIE 1931 XYZ space, of the diffuse white point. The numbers X and Z must be positive, and Y must be equal to 1.0.
Create a Lab color space.
LabColorSpace
LabColorSpace(const std::vector< double > &white_point, const std::vector< double > &black_point, const std::vector< double > &range)Parameters
white_point: const std::vector< double > &An array of three numbers specifying the tristimulus value, in the CIE 1931 XYZ space, of the diffuse white point. The numbers X and Z must be positive, and Y must be equal to 1.0.
black_point: const std::vector< double > &An array of three numbers specifying the tristimulus value, in the CIE 1931 XYZ space, of the diffuse black point. All three of these numbers must be non-negative.
range: const std::vector< double > &An array of four numbers [ amin amax bmin bmax ] specifying the range of valid values for the a* and b* (B and C) components of the color space.
Create a Lab color space.
Member Function Documentation
get_black_point
std::vector< double >get_black_point()Returns:
An array of three doubles representing the X, Y, and Z tristimulus values of the black point.An array of three numbers specifying the tristimulus value, in the CIE 1931 XYZ space, of the diffuse black point. All three of these numbers must be non-negative. If no black point was specified during construction, the default value [0.0, 0.0, 0.0] is returned.
get_name
std::stringget_name()Returns:
std::stringThe 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
std::unique_ptr< PDFObject >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_range
std::vector< double >get_range()Returns:
An array of four doubles specifying the minimum and maximum values for a* and b*.An array of four numbers [ amin amax bmin bmax ] specifying the range of valid values for the a* and b* (B and C) components of the color space. If no range was specified during construction, the default value [-100, 100, -100, 100] is returned.
get_white_point
std::vector< double >get_white_point()Returns:
An array of three doubles representing the X, Y, and Z tristimulus values of the white point.An array of three numbers specifying the tristimulus value, in the CIE 1931 XYZ space, of the diffuse white point. The numbers X and Z must be positive, and Y must be equal to 1.0.
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.