Apitron.PDF.Kit library for .NET
Assembly: Apitron.PDF.Kit (in Apitron.PDF.Kit.dll) Version: 2.0.37.0 (2.0.37.0)
Initializes a new instance of the CalGrayColorSpace class.
Namespace: Apitron.PDF.Kit.FixedLayout.Resources.ColorSpaces.CIEBased
Assembly: Apitron.PDF.Kit (in Apitron.PDF.Kit.dll) Version: 2.0.37.0 (2.0.37.0)
Syntax
public CalRgbColorSpace( string resourceID, double[] whitePoint, double[] blackPoint, double[] gamma, double[] matrix )
Parameters
- resourceID
- Type: SystemString
The resource ID. - whitePoint
- Type: SystemDouble
The white point is an array of three numbers [XW YW ZW] specifying the tristimulus value, in the CIE 1931 XYZ space, of the diffuse white point. The numbers XW and ZW shall be positive, and YW shall be equal to 1.0. - blackPoint
- Type: SystemDouble
The black point is an array of three numbers [XB YB ZB] specifying the tristimulus value, in the CIE 1931 XYZ space, of the diffuse black point. All three of these numbers shall be non-negative. Default value: [0.0 0.0 0.0]. - gamma
- Type: SystemDouble
The gamma is an array of three numbers [GR GG GB] specifying the gamma for the red, green, and blue (A, B, and C) components of the colour space. Default value: [1.0 1.0 1.0]. - matrix
- Type: SystemDouble
The matrix is an array of nine numbers [XA YA ZA XB YB ZB XC YC ZC] specifying the linear interpretation of the decoded A, B, and C components of the colour space with respect to the final XYZ representation. Default value: the identity matrix [1 0 0 0 1 0 0 0 1].
Examples
C#
// register color space as a resource document.ResourceManager.RegisterResource(new CalRgbColorSpace("CS_CALRGB", new double[] { 0.12, 1.0, 0.21 }, new double[] { 0.23, 0.54, 0.78 }, new double[] { 1.0, 1.0, 1.0 }, new double[] { 1.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 1.0 })); // set color space page.Content.SetNonStrokingColorSpace("CS_CALRGB"); page.Content.SetNonStrokingColor(0.67, 0.99, 0.13); // set color page.Content.SetStrokingColorSpace("CS_CALRGB"); page.Content.SetStrokingColor(0.4, 0.54, 0.65);
See Also