PDFix SDK  7.2.0
Loading...
Searching...
No Matches
PdfColor Struct Referenceabstract

PdfColor class. More...

#include <pdfix.h>

Public Member Functions

virtual PdfColorSpaceGetColorSpace ()=0
 Gets the color space. More...
 
virtual void SetColorSpace (PdfColorSpace *color_space)=0
 Sets the the color space. More...
 
virtual float GetValue (int index) const =0
 Gets the specific value of the color at index. More...
 
virtual void SetValue (int index, float value)=0
 Sets the specific value of the color at index. More...
 
virtual bool GetRGB (PdfRGB *rgb) const =0
 Convinience function to get RGB values of the color. More...
 
virtual bool GetCMYK (PdfCMYK *cmyk) const =0
 Convinience function to get CMYK values of the color. More...
 
virtual bool GetGrayscale (PdfGray *gray) const =0
 Convinience function to get gray value of the color. More...
 
virtual void Destroy ()=0
 Destroys color's resources. More...
 

Detailed Description

PdfColor class.

The PdfColor.

Member Function Documentation

◆ Destroy()

virtual void PdfColor::Destroy ( )
pure virtual

Destroys color's resources.

See also
PdfColorSpace::CreateColor

◆ GetCMYK()

virtual bool PdfColor::GetCMYK ( PdfCMYK cmyk) const
pure virtual

Convinience function to get CMYK values of the color.

Parameters
cmykCMYK structure that will be filled by the function.
Returns
true if the conversion to CMYK was successfull.

◆ GetColorSpace()

virtual PdfColorSpace * PdfColor::GetColorSpace ( )
pure virtual

Gets the color space.

Returns
The color space.

◆ GetGrayscale()

virtual bool PdfColor::GetGrayscale ( PdfGray gray) const
pure virtual

Convinience function to get gray value of the color.

Parameters
grayGrayscale structure that will be filled by the function.
Returns
true if the conversion to Grayscale was successfull.

◆ GetRGB()

virtual bool PdfColor::GetRGB ( PdfRGB rgb) const
pure virtual

Convinience function to get RGB values of the color.

Parameters
rgbRGB structure that will be filled by the function.
Returns
true if the conversion to RGB was successfull.

◆ GetValue()

virtual float PdfColor::GetValue ( int  index) const
pure virtual

Gets the specific value of the color at index.

Parameters
indexMust be smaller than components count of the colorspace.
Returns
Color value at the index, usually between 0.0 and 1.0.

◆ SetColorSpace()

virtual void PdfColor::SetColorSpace ( PdfColorSpace color_space)
pure virtual

Sets the the color space.

Parameters
color_spaceColor space to be set. Must not be nullptr.

◆ SetValue()

virtual void PdfColor::SetValue ( int  index,
float  value 
)
pure virtual

Sets the specific value of the color at index.

Parameters
indexMust be smaller than components count of the colorspace.
valueNew value to be set.