A color.
More...
#include <SignDocSDK-cpp.h>
A color.
Use the static factory functions to create SignDocColor objects. Do not forget to destroy the objects after use.
Type of color.
Enumerator |
---|
t_gray |
Gray scale.
|
t_rgb |
RGB color.
|
Create a copy of this object.
Do not forget to destroy the copy after use.
- Returns
- A pointer to the new object.
Create a new gray-scale color object.
- Parameters
-
[in] | aIntensity | The 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] | aRed | The value of the red channel. |
[in] | aGreen | The value of the green channel. |
[in] | aBlue | The value of the blue channel. |
- Returns
- A pointer to the new color object. Do not forget to destroy the object after use.
Create a new RGB color object from a single integer.
- Parameters
-
[in] | aRGB | 0x00rrggbb (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] | aIndex | The 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 |
const SIGNDOC_Color* getImpl |
( |
| ) |
const |
|
inline |
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).
Get the color type of this object.
- Returns
- The color type.
void setImpl |
( |
SIGNDOC_Color * |
aP | ) |
|
|
inline |
The documentation for this class was generated from the following file: