Foxit PDF SDK
FoxitPDFSDKPython2.ColorSpace Class Reference
Inheritance diagram for FoxitPDFSDKPython2.ColorSpace:
FoxitPDFSDKPython2.Base

Public Member Functions

def ColorSpace (other)
 Constructor, with another color space object.
More...
 
def ConvertColor (color)
 Convert input color to the color in current color space.
More...
 
def GetColorSpaceType ()
 Get color space type.
More...
 
def GetComponentCount ()
 Get the count of components.
More...
 
def GetComponentNames ()
 Get a string array which represents the name of colorant for Separation color space, or names specifying the individual color components for DeviceN color space.
More...
 
def IsEmpty ()
 Check whether current object is empty or not.
More...
 
def IsSpotColorSpace ()
 Check whether current color space object is a spot color space or not.
More...
 

Static Public Attributes

 e_RenderIntentAbsColorimetric = _fsdk.ColorSpace_e_RenderIntentAbsColorimetric
 Rendering intent: Absolute Colorimetric.

 
 e_RenderIntentPerceptual = _fsdk.ColorSpace_e_RenderIntentPerceptual
 Rendering intent: Perceptual.

 
 e_RenderIntentRelColorimetric = _fsdk.ColorSpace_e_RenderIntentRelColorimetric
 Rendering intent: Relative Colorimetric.

 
 e_RenderIntentSaturation = _fsdk.ColorSpace_e_RenderIntentSaturation
 Rendering intent: Saturation.

 

Detailed Description

This class represents color space. User can use this class to covert colors.

Constructor & Destructor Documentation

◆ ColorSpace()

def FoxitPDFSDKPython2.ColorSpace.ColorSpace (   other)

Constructor, with another color space object.

Parameters
[in]otherAnother color space object.

Member Function Documentation

◆ ConvertColor()

def FoxitPDFSDKPython2.ColorSpace.ConvertColor (   color)

Convert input color to the color in current color space.

Convert input R/G/B component values to a color in current color space.

Convert input C/M/Y/K component values to a color object in current color space.

Parameters
[in]colorInput color, which is to be converted to current color space.
Returns
Converted color. If the return value of function FoxitPDFSDKPython2.Color.IsEmpty for the returned color is true, that means the conversion failed.
Parameters
[in]c_valueC component value. Valid range: from 0 to 255.
[in]m_valueM component value. Valid range: from 0 to 255.
[in]y_valueY component value. Valid range: from 0 to 255.
[in]k_valueK component value. Valid range: from 0 to 255.
Returns
Converted color. If the return value of function FoxitPDFSDKPython2.Color.IsEmpty for the returned color is true, that means the conversion failed.
Parameters
[in]r_valueR component value. Valid range: from 0 to 255.
[in]g_valueG component value. Valid range: from 0 to 255.
[in]b_valueB component value. Valid range: from 0 to 255.
Returns
Converted color. If the return value of function FoxitPDFSDKPython2.Color.IsEmpty for the returned color is true, that means the conversion failed.

◆ GetColorSpaceType()

def FoxitPDFSDKPython2.ColorSpace.GetColorSpaceType ( )

Get color space type.

Returns
Color space type. Please refer to values starting from FoxitPDFSDKPython2.e_ColorSpaceInvalid and this would be one of these values.

◆ GetComponentCount()

def FoxitPDFSDKPython2.ColorSpace.GetComponentCount ( )

Get the count of components.

For different color space type, the count of components are not the same.

Returns
Count of components.

◆ GetComponentNames()

def FoxitPDFSDKPython2.ColorSpace.GetComponentNames ( )

Get a string array which represents the name of colorant for Separation color space, or names specifying the individual color components for DeviceN color space.

This function is only available when current color space type is FoxitPDFSDKPython2.e_ColorSpaceSeparation or FoxitPDFSDKPython2.e_ColorSpaceDeviceN . For other color space type, this function will return an empty string array.

Returns
A string array of name(s).
  • For Separation color space, the count of returned array will be only one and the string specifies the name of colorant.
  • For DeviceN color space, there can be several strings in returned array and they specify the individual color components.

◆ IsEmpty()

def FoxitPDFSDKPython2.ColorSpace.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.

◆ IsSpotColorSpace()

def FoxitPDFSDKPython2.ColorSpace.IsSpotColorSpace ( )

Check whether current color space object is a spot color space or not.

Returns
true means current object is spot color space, while false means not.