Foxit PDF SDK
FoxitPDFSDKPython3.Color Class Reference
Inheritance diagram for FoxitPDFSDKPython3.Color:
FoxitPDFSDKPython3.Base

Public Member Functions

def Color ()
 Construct an empty color.

 
def Color (color_space)
 Constructor, with a color space object.
More...
 
def Color (other)
 Constructor, with another color object.
More...
 
def ConvertToCMYK (intent)
 Convert to a CMYK color.
More...
 
def ConvertToRGB (intent)
 Convert to a RGB color.
More...
 
def GetColorSpace ()
 Get the color space that current color belongs to.
More...
 
def GetValue ()
 Get component value array.
More...
 
def IsEmpty ()
 Check whether current object is empty or not.
More...
 
def SetValue (component_array)
 Set component value array.
More...
 

Detailed Description

This class represents a color.

Constructor & Destructor Documentation

◆ Color() [1/2]

def FoxitPDFSDKPython3.Color.Color (   color_space)

Constructor, with a color space object.

Parameters
[in]color_spaceA valid color space object.

◆ Color() [2/2]

def FoxitPDFSDKPython3.Color.Color (   other)

Constructor, with another color object.

Parameters
[in]otherAnother Color object.

Member Function Documentation

◆ ConvertToCMYK()

def FoxitPDFSDKPython3.Color.ConvertToCMYK (   intent)

Convert to a CMYK color.

Parameters
[in]intent(Reserved) Rendering intent used for color conversion.
Returns
Converted color. If the return value of function FoxitPDFSDKPython3.Color.IsEmpty for the returned color is true, that means the conversion failed.

◆ ConvertToRGB()

def FoxitPDFSDKPython3.Color.ConvertToRGB (   intent)

Convert to a RGB color.

Parameters
[in]intent(Reserved) Rendering intent used for color conversion.
Returns
Converted color. If the return value of function FoxitPDFSDKPython3.Color.IsEmpty for the returned color is true, that means the conversion failed.

◆ GetColorSpace()

def FoxitPDFSDKPython3.Color.GetColorSpace ( )

Get the color space that current color belongs to.

Returns
Color space object.

◆ GetValue()

def FoxitPDFSDKPython3.Color.GetValue ( )

Get component value array.

The count of components depends on the color space that current color belongs to. User can get the color space object by function FoxitPDFSDKPython3.Color.GetColorSpace , and then get the count of componets by function FoxitPDFSDKPython3.ColorSpace.GetComponentCount .

Returns
A component value array. Each component value would be in the range from 0.0 to 1.0.

◆ IsEmpty()

def FoxitPDFSDKPython3.Color.IsEmpty ( )

Check whether current object is empty or not.

When the current object is empty, that means current object is useless.

Returns
true means current object is empty, while false means not.

◆ SetValue()

def FoxitPDFSDKPython3.Color.SetValue (   component_array)

Set component value array.

The count of components depends on the color space that current color belongs to. User can get the color space object by function FoxitPDFSDKPython3.Color.GetColorSpace , and then get the count of componets by function FoxitPDFSDKPython3.ColorSpace.GetComponentCount .

Parameters
[in]component_arrayA component value array. The count of components in this array should match the count of components of the color space that current color belongs to. Valid range of each component value: from 0.0 to 1.0.
Returns
None.