SignDoc SDK (C++)  5.0.0
SignDocColor Class Reference

A color. More...

#include <SignDocSDK-cpp.h>

Public Types

enum  Type { t_gray, t_rgb }
 Type of color. More...
 

Public Member Functions

 ~SignDocColor ()
 Destructor. More...
 
SignDocColorclone () const
 Create a copy of this object. More...
 
Type getType () const
 Get the color type of this object. More...
 
unsigned getNumberOfComponents () const
 Get the number of color components (channels). More...
 
unsigned char getComponent (unsigned aIndex) const
 Get one color component (channel). More...
 
unsigned char getIntensity () const
 Get the intensity of a gray-scale color object. More...
 
unsigned char getRed () const
 Get the red component of an RGB color object. More...
 
unsigned char getGreen () const
 Get the green component of an RGB color object. More...
 
unsigned char getBlue () const
 Get the blue component of an RGB color object. More...
 
unsigned getRGB () const
 Get the color as integer (0x00rrggbb). More...
 
 SignDocColor (SIGNDOC_Color *aP)
 Internal function. More...
 
SIGNDOC_Color * getImpl ()
 Internal function. More...
 
const SIGNDOC_Color * getImpl () const
 Internal function. More...
 
void setImpl (SIGNDOC_Color *aP)
 Internal function. More...
 

Static Public Member Functions

static SignDocColorcreateGray (unsigned char aIntensity)
 Create a new gray-scale color object. More...
 
static SignDocColorcreateRGB (unsigned char aRed, unsigned char aGreen, unsigned char aBlue)
 Create a new RGB color object. More...
 
static SignDocColorcreateRGB (unsigned aRGB)
 Create a new RGB color object from a single integer. More...
 

Detailed Description

A color.

Use the static factory functions to create SignDocColor objects. Do not forget to destroy the objects after use.

Member Enumeration Documentation

enum Type

Type of color.

Enumerator
t_gray 

Gray scale.

t_rgb 

RGB color.

Constructor & Destructor Documentation

~SignDocColor ( )
inline

Destructor.

SignDocColor ( SIGNDOC_Color *  aP)
inline

Internal function.

Member Function Documentation

SignDocColor * clone ( ) const
inline

Create a copy of this object.

Do not forget to destroy the copy after use.

Returns
A pointer to the new object.
SignDocColor * createGray ( unsigned char  aIntensity)
inlinestatic

Create a new gray-scale color object.

Parameters
[in]aIntensityThe intensity (0 through 255, 0 is black).
Returns
A pointer to the new color object. Do not forget to destroy the object after use.
SignDocColor * createRGB ( unsigned char  aRed,
unsigned char  aGreen,
unsigned char  aBlue 
)
inlinestatic

Create a new RGB color object.

The values are in 0 through 255, 0 is black.

Parameters
[in]aRedThe value of the red channel.
[in]aGreenThe value of the green channel.
[in]aBlueThe value of the blue channel.
Returns
A pointer to the new color object. Do not forget to destroy the object after use.
SignDocColor * createRGB ( unsigned  aRGB)
inlinestatic

Create a new RGB color object from a single integer.

Parameters
[in]aRGB0x00rrggbb (rr is the red component, gg is the green component, bb is the blue component).
Returns
A pointer to the new color object. Do not forget to destroy the object after use.
unsigned char getBlue ( ) const
inline

Get the blue component of an RGB color object.

Returns
The blue component (0 through 255, 0 is black) of an RGB color object, undefined for other color types.
unsigned char getComponent ( unsigned  aIndex) const
inline

Get one color component (channel).

Parameters
[in]aIndexThe index of the color component (0 through 2). The meaning depends on the color type.
Returns
The value (0 through 255) of the color component aIndex or 0 if aIndex is out of range.
unsigned char getGreen ( ) const
inline

Get the green component of an RGB color object.

Returns
The green component (0 through 255, 0 is black) of an RGB color object, undefined for other color types.
SIGNDOC_Color* getImpl ( )
inline

Internal function.

const SIGNDOC_Color* getImpl ( ) const
inline

Internal function.

unsigned char getIntensity ( ) const
inline

Get the intensity of a gray-scale color object.

Returns
The intensity (0 through 255, 0 is black) for a gray-scale color object, undefined for other color types.
unsigned getNumberOfComponents ( ) const
inline

Get the number of color components (channels).

Returns
1 for gray scale, 3 for RGB.
unsigned char getRed ( ) const
inline

Get the red component of an RGB color object.

Returns
The red component (0 through 255, 0 is black) of an RGB color object, undefined for other color types.
unsigned getRGB ( ) const
inline

Get the color as integer (0x00rrggbb).

rr is the red component, gg is the green component, bb is the blue component.

Returns
The color as integer (0x00rrggbb).
SignDocColor::Type getType ( ) const
inline

Get the color type of this object.

Returns
The color type.
void setImpl ( SIGNDOC_Color *  aP)
inline

Internal function.


The documentation for this class was generated from the following file: