Main Page
Modules Alphabetical List Data Structures Data Fields
|
Data Structures
|
struct |
RwRGBA
|
struct |
RwRGBAReal
|
Functions
|
void |
RwRGBARealAdd (RwRGBAReal *result, const RwRGBAReal *source1, const
RwRGBAReal
*source2) |
void |
RwRGBARealSub (RwRGBAReal *result, const RwRGBAReal *source1, const
RwRGBAReal
*source2) |
void |
RwRGBARealScale (RwRGBAReal *result, const RwRGBAReal *source, RwReal scalar) |
void |
RwRGBAFromRwRGBAReal (RwRGBA *result, const RwRGBAReal *source) |
void |
RwRGBARealFromRwRGBA (RwRGBAReal *result, RwRGBA *source) |
RwUInt32 |
RwRGBAToPixel (RwRGBA *rgbIn, RwInt32 rasterFormat) |
RwRGBA * |
RwRGBASetFromPixel (RwRGBA *rgbOut, RwUInt32 pixelValue, RwInt32
rasterFormat) |
RwRGBA * |
RwRGBAGammaCorrect (RwRGBA *rgb) |
RwRGBA * |
RwRGBAGetRasterPixel (RwRGBA *rgbOut, RwRaster *raster, RwInt32 x, RwInt32 y) |
Detailed Description
Color space functionality.
- Requirements
-
- Headers: rwcore.h
- Libraries: rwcore.lib
This object represents color and alpha components.
The data is usually stored combined into a single 32-bit
integer, with 8 bits per component, although this should not be
assumed.
Functions are provided to convert to and from the RwRGBAReal format, which uses
individual RwReals to store each component. (Other RenderWare
objects usually use the RwRGBA form, but a real number variant is
useful for some color processing tasks.)
Further functionality is provided for tasks like gamma
correction, storing and retrieving RGBA data directly from a
pixel.
Function Documentation
|
RwRGBAFromRwRGBAReal is used to convert
the specified real color to an RwRGBA. RwRGBA is an integer representation of the
color.
- Note:
- Note that this function is used for debug purposes only and,
for efficiency, is available as a macro for final release versions
of an application.
- Parameters:
-
result |
A pointer to the RwRGBA color which will receive the
result |
source |
A pointer to the real color that will be converted. |
- Returns:
- None.
- See also:
- RwRGBARealFromRwRGBA , RwRGBARealScale , RwRGBARealAdd , RwRGBARealSub
|
|
RwRGBAGetRasterPixel is used to query
the value a pixel in the specified raster at the given
location.
- Parameters:
-
rgbOut |
A pointer to an RwRGBA value which will receive the pixel
value |
raster |
A pointer to the raster to query |
x |
An RwInt32
value equal to the pixels x-coordinate in the raster |
y |
An RwInt32
value equal to the pixels y-coordinate in the raster. |
- Returns:
- Returns a pointer to the pixel value if successful or NULL if
there an error.
- See also:
- RwRGBASetFromPixel , RwRGBAToPixel
|
|
RwRGBARealAdd is
used to add together the specified real colors. The result of the
addition is placed in a third real color.
- Note:
- Note that this function is used for debug purposes only and,
for efficiency, is available as a macro for final release versions
of an application.
- Parameters:
-
result |
A pointer to the real color that will receive the result of the
addition |
source1 |
A pointer to the first real color |
source2 |
A pointer to the second real color. |
- Returns:
- None.
- See also:
- RwRGBARealSub ,
RwRGBARealScale
|
|
RwRGBARealFromRwRGBA is used to convert
the specified RwRGBA
color to a real color. RwRGBA is an integer representation of the
color.
- Note:
- Note that this function is used for debug purposes only and,
for efficiency, is available as a macro for final release versions
of an application.
- Parameters:
-
result |
A pointer to the real color that will receive the result |
source |
A pointer to the RwRGBA color that will be converted. |
- Returns:
- None.
- See also:
- RwRGBAFromRwRGBAReal , RwRGBARealScale , RwRGBARealAdd , RwRGBARealSub
|
|
RwRGBARealScale
is used to multiply the specified real color by the given scalar.
The result is placed in a second real color.
- Note:
- Note that this function is used for debug purposes only and,
for efficiency, is available as a macro for final release versions
of an application.
- Parameters:
-
result |
A pointer to the real color that will receive the result |
source |
A pointer to the real color that will be scaled |
scalar |
An RwReal
value equal to the scale factor. |
- Returns:
- None.
- See also:
- RwRGBARealAdd ,
RwRGBARealSub
|
|
RwRGBARealSub is
used to subtract the specified real colors. The second color is
subtracted from the first. The result of the subtraction is placed
in a third real color.
- Note:
- Note that this function is used for debug purposes only and,
for efficiency, is available as a macro for final release versions
of an application.
- Parameters:
-
result |
A pointer to the real color that will receive the result of the
subtraction |
source1 |
A pointer to the first real color |
source2 |
A pointer to the second real color. |
- Returns:
- None.
- See also:
- RwRGBARealAdd ,
RwRGBARealScale
|
© 1993-2003 Criterion Software Limited. All
rights reserved. Built Tue Apr 22 12:46:13 2003. Send Feedback