Foxit PDF SDK  9.1
FSColor Class Reference
Inheritance diagram for FSColor:
FSBase

Instance Methods

(FSColor *) - convertToCMYK
 Convert to a CMYK color.
More...
 
(FSColor *) - convertToCMYK:
 Convert to a CMYK color.
More...
 
(FSColor *) - convertToRGB
 Convert to a RGB color.
More...
 
(FSColor *) - convertToRGB:
 Convert to a RGB color.
More...
 
(void) - dealloc
 
(FSColorSpace *) - getColorSpace
 Get the color space that current color belongs to.
More...
 
(void *) - getCptr
 
(id) - init
 Construct an empty color.
More...
 
(id) - initWithColor_space:
 Constructor, with a color space object.
More...
 
(id) - initWithCptr:swigOwnCObject:
 
(id) - initWithOther:
 Constructor, with another color object.
More...
 
(BOOL) - isEmpty
 Check whether current object is empty or not.
More...
 

Properties

FSFloatArrayvalue
 Get or Set component value array.
More...
 

Additional Inherited Members

- Protected Attributes inherited from FSBase
BOOL swigCMemOwn
 
void * swigCPtr
 

Detailed Description

This class represents a color.

Method Documentation

◆ convertToCMYK

- (FSColor *) convertToCMYK

Convert to a CMYK color.

Returns
Converted color. If the return value of function FSColor::isEmpty for the returned color is YES, that means the conversion failed.

◆ convertToCMYK:

- (FSColor *) convertToCMYK: (FSColorSpaceRenderingIntent 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 FSColor::isEmpty for the returned color is YES, that means the conversion failed.

◆ convertToRGB

- (FSColor *) convertToRGB

Convert to a RGB color.

Returns
Converted color. If the return value of function FSColor::isEmpty for the returned color is YES, that means the conversion failed.

◆ convertToRGB:

- (FSColor *) convertToRGB: (FSColorSpaceRenderingIntent 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 FSColor::isEmpty for the returned color is YES, that means the conversion failed.

◆ dealloc

- (void) dealloc

Reimplemented from FSBase.

◆ getColorSpace

- (FSColorSpace *) getColorSpace

Get the color space that current color belongs to.

Returns
Color space object.

◆ getCptr

- (void*) getCptr

Reimplemented from FSBase.

◆ init

- (id) init

Construct an empty color.

◆ initWithColor_space:

- (id) initWithColor_space: (FSColorSpace*)  color_space

Constructor, with a color space object.

Parameters
[in]color_spaceA valid color space object.

◆ initWithCptr:swigOwnCObject:

- (id) initWithCptr: (void *)  cptr
swigOwnCObject: (BOOL)  ownCObject 

Reimplemented from FSBase.

◆ initWithOther:

- (id) initWithOther: (FSColor*)  other

Constructor, with another color object.

Parameters
[in]otherAnother FSColor object.

◆ isEmpty

- (BOOL) isEmpty

Check whether current object is empty or not.

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

Returns
YES means current object is empty, while NO means not.

Property Documentation

◆ value

- (FSFloatArray *) value
readwritenonatomiccopy

Get or 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 FSColor::getColorSpace, and then get the count of componets by function FSColorSpace::getComponentCount.