Class Index

Classes


Class PDFNet.ColorPt

PDFNet.ColorPt

Class Summary
Constructor Attributes Constructor Name and Description
 
ColorPt is an array of colorants (or tint values) representing a color point in an associated color space.
Method Summary
Method Attributes Method Name and Description
 
assign(right)
Copy Constructor
 
compare(right)
Comparison function.
 
Frees the native memory of the object.
 
get(colorant_index)
The number of colorants depends on the associated color space.
<static>  
PDFNet.ColorPt.init(x, y, z, w)
Constructor
 
set(x, y, z, w)
A utility method to set the first 4 tint values.
 
setByIndex(colorant_index, colorant_value)
Sets a tint value at a given colorant index.
 
If a color point has more than 4 colorants, SetColorantNum(num_colorants) must be called before getting or setting tint values.
Class Detail
PDFNet.ColorPt(id)
ColorPt is an array of colorants (or tint values) representing a color point in an associated color space.
Parameters:
id
Method Detail
assign(right)
Copy Constructor
Parameters:
{colorpt} right
(generated documentation)

{[ERROR]} compare(right)
Comparison function. Determines if parameter object is equal to current object.
Parameters:
right
Returns:
{[ERROR]} True if the two objects are equivalent. False otherwise @param {colorpt} right (generated documentation)

destroy()
Frees the native memory of the object.

{number} get(colorant_index)
The number of colorants depends on the associated color space. To find how many colorant are associated with a given color space use color_space.GetComponentNum(). For example, if you have a color point in the RGB color space you can extract its colorants as follows:
Parameters:
{number} colorant_index
number representing the index of the color space to get the tint from
Returns:
{number} A promise that resolves to the tint value at a given colorant index.

<static> {colorpt} PDFNet.ColorPt.init(x, y, z, w)
Constructor
Parameters:
{number} x
initialized value of first color value (eg. red for rgb colorspace);
{number} y
initialized value of second color value (eg. green for rgb colorspace);
{number} z
initialized value of third color value (eg. blue for rgb colorspace);
{number} w
initialized value of fourth color value (eg. when using CMYK);
Returns:
{colorpt} A promise that resolves to an object of type: "colorpt" (generated documentation)

set(x, y, z, w)
A utility method to set the first 4 tint values. For example, color.Set(red, green, blue) will initialize the ColorPt to given tint values.
Parameters:
{number} x
initialized value of first color value (eg. red for rgb colorspace);
{number} y
initialized value of second color value (eg. green for rgb colorspace);
{number} z
initialized value of third color value (eg. blue for rgb colorspace);
{number} w
initialized value of fourth color value (eg. when using CMYK);

setByIndex(colorant_index, colorant_value)
Sets a tint value at a given colorant index.
Parameters:
{number} colorant_index
the color index. For example, for a color point associated with a Gray color space the only allowed value for index is 0. For a color point associated with a CMYK color space, the color_index can range from 0 (cyan) to 4 (black).
{number} colorant_value
The new tint value. For example, the following snippet will initialize the color point to [red, green, blue]:

setColorantNum(num)
If a color point has more than 4 colorants, SetColorantNum(num_colorants) must be called before getting or setting tint values. The number of colorants depends on the associated color space. To find how many colorant are associated with a given color space use color_space.GetComponentNum().
Parameters:
{number} num
(generated documentation)

Documentation generated by JsDoc Toolkit 2.4.0 on Wed Mar 22 2017 11:30:11 GMT-0700 (PDT)