#include <djv_common.h>
List of all members.
Detailed Description
This structure is used to express a color.
Constructor & Destructor Documentation
| Celartem::DjVu::Color::Color |
( |
u8 |
inRed, |
|
|
u8 |
inGreen, |
|
|
u8 |
inBlue, |
|
|
u8 |
inReserved = 0 | |
|
) |
| | [inline] |
Initialize with a color.
- Parameters:
-
| inRed | |
| inGreen | |
| inBlue | |
| inReserved | Every component of a color. |
| Celartem::DjVu::Color::Color |
( |
const Color & |
inColor |
) |
[inline] |
Copy a Color instance.
- Parameters:
-
| inColor | A Color instance. |
Member Function Documentation
| static Color Celartem::DjVu::Color::fromBGR |
( |
const u8 * |
inSrc |
) |
[inline, static] |
Create a new Color instance from B-G-R data.
- Parameters:
-
- Returns:
- Return newly created Color instance.
| static Color Celartem::DjVu::Color::fromGray |
( |
const u8 * |
inSrc |
) |
[inline, static] |
Create a new Color instance from gray data.
- Parameters:
-
- Returns:
- Return newly created Color instance.
| static Color Celartem::DjVu::Color::fromRGB |
( |
const u8 * |
inSrc |
) |
[inline, static] |
Create a new Color instance from R-G-B data.
- Parameters:
-
- Returns:
- Return newly created Color instance.
| static Color Celartem::DjVu::Color::fromYCbCr |
( |
const u8 * |
inSrc |
) |
[static] |
Create a new Color instance from Y-Cb-Cr data.
- Parameters:
-
| inSrc | 8-bit Y-Cb-Cr data. |
- Returns:
- Return newly created Color instance.
| u8 Celartem::DjVu::Color::getBlue |
( |
|
) |
const [inline] |
Get the blue value.
- Returns:
- The blue value. The value is within 0 - 255.
Referenced by getDist2().
| size_t Celartem::DjVu::Color::getDist2 |
( |
const Color & |
r |
) |
const [inline] |
Get square of the distance between this and another.
- Parameters:
-
| r | Another Color instance to calculate the distance with. |
- Returns:
- Returns distance^2.
| u8 Celartem::DjVu::Color::getGreen |
( |
|
) |
const [inline] |
Get the green value.
- Returns:
- The green value. The value is within 0 - 255.
Referenced by getDist2().
| u8 Celartem::DjVu::Color::getRed |
( |
|
) |
const [inline] |
Get the red value.
- Returns:
- The red value. The value is within 0 - 255.
Referenced by getDist2().
| u8 Celartem::DjVu::Color::getReserved |
( |
|
) |
const [inline] |
Get the reserved value (the highest 8-bits).
- Returns:
- The reserved value. The value is within 0 - 255.
| bool Celartem::DjVu::Color::isValid |
( |
|
) |
const [inline] |
Determines whether the color is valid or not.
The definition of the valid colors is that the highest 8bit are all 0. In other words, color is smaller than 0x1000000.
- Returns:
true if the color is valid; otherwise false.
- See also:
- InvalidColor
| bool Celartem::DjVu::Color::operator!= |
( |
const Color & |
r |
) |
const [inline] |
Compare this instance with another (check inequality).
- Parameters:
-
| r | Another Color instance to compare with. |
- Returns:
true if the color member of this Color instance is not equal to the one of r.
| bool Celartem::DjVu::Color::operator< |
( |
const Color & |
r |
) |
const [inline] |
Compare this instance with another.
- Parameters:
-
| r | Another Color instance to compare with. |
- Returns:
true if the color member of this Color instance is less than the one of r.
| Color& Celartem::DjVu::Color::operator= |
( |
u32 |
inColor |
) |
[inline] |
Assign a color.
- Parameters:
-
| inColor | A Color instance. |
| Color& Celartem::DjVu::Color::operator= |
( |
const Color & |
inColor |
) |
[inline] |
Copy a Color instance.
- Parameters:
-
| inColor | A Color instance. |
| bool Celartem::DjVu::Color::operator== |
( |
const Color & |
r |
) |
const [inline] |
Compare this instance with another (check equality).
- Parameters:
-
| r | Another Color instance to compare with. |
- Returns:
true if the color member of this Color instance is equal to the one of r.
Member Data Documentation
The documentation for this struct was generated from the following file: