csPackRGBA Struct Reference
[Graphics]
RGBA data packing. More...
#include <csgfx/packrgb.h>
Static Public Member Functions | |
static csRGBpixel * | CopyUnpackRGBAtoRGBpixel (const uint8 *rgba, size_t numPixels) |
Unpack a RGBA byte array into an array of csRGBpixel. | |
static void | csDiscardUnpackedRGBpixel (const csRGBpixel *pixels) |
Frees memory possibly allocated by UnpackRGBAtoRGBpixel(). | |
static void | DiscardPackedRGBA (const uint8 *rgba) |
Frees memory possibly allocated by PackRGBpixelToRGBA(). | |
static const uint8 * | PackRGBpixelToRGBA (const csRGBpixel *pixels, size_t numPixels) |
Pack an array of csRGBpixel into a RGBA byte array. | |
static void | PackRGBpixelToRGBA (uint8 *buf, const csRGBpixel *pixels, size_t numPixels) |
Pack an array of csRGBpixel into a RGBA byte array. | |
static csRGBcolor * | UnpackRGBAtoRGBcolor (const uint8 *rgba, size_t numPixels) |
Unpack a RGBA byte array into an array of csRGBcolor. | |
static const csRGBpixel * | UnpackRGBAtoRGBpixel (const uint8 *rgba, size_t numPixels) |
Unpack a RGBA byte array into an array of csRGBpixel. | |
static void | UnpackRGBAtoRGBpixel (csRGBpixel *buf, const uint8 *rgba, size_t numPixels) |
Unpack a RGBA byte array into an array of csRGBpixel. |
Detailed Description
RGBA data packing.
Definition at line 220 of file packrgb.h.
Member Function Documentation
static csRGBpixel* csPackRGBA::CopyUnpackRGBAtoRGBpixel | ( | const uint8 * | rgba, | |
size_t | numPixels | |||
) | [inline, static] |
Unpack a RGBA byte array into an array of csRGBpixel.
- Remarks:
- Never returns
rgba
. Allocate memory. Free it using delete[] when finished.
- Parameters:
-
rgba Source array of RGBA data numPixels Number of pixels in the array
- Returns:
- An array containing the source data in csRGBpixel structs.
static void csPackRGBA::csDiscardUnpackedRGBpixel | ( | const csRGBpixel * | pixels | ) | [inline, static] |
Frees memory possibly allocated by UnpackRGBAtoRGBpixel().
- Parameters:
-
pixels Pointer to csRGBpixel array returned by UnpackRGBAtoRGBpixel().
static void csPackRGBA::DiscardPackedRGBA | ( | const uint8 * | rgba | ) | [inline, static] |
Frees memory possibly allocated by PackRGBpixelToRGBA().
- Parameters:
-
rgba Pointer to packed RGB data returned by PackRGBpixelToRGBA().
static const uint8* csPackRGBA::PackRGBpixelToRGBA | ( | const csRGBpixel * | pixels, | |
size_t | numPixels | |||
) | [inline, static] |
Pack an array of csRGBpixel into a RGBA byte array.
- Remarks:
- May return
pixels
. May allocate memory. Free it using DiscardPackedRGBA() when finished.
- Parameters:
-
pixels Source array of csRGBpixel data numPixels Number of pixels in the array
- Returns:
- A byte array containing the source data packed as RGBA.
static void csPackRGBA::PackRGBpixelToRGBA | ( | uint8 * | buf, | |
const csRGBpixel * | pixels, | |||
size_t | numPixels | |||
) | [inline, static] |
Pack an array of csRGBpixel into a RGBA byte array.
- Parameters:
-
buf Buffer to pack the data into. pixels Source array of csRGBpixel data numPixels Number of pixels in the array
static csRGBcolor* csPackRGBA::UnpackRGBAtoRGBcolor | ( | const uint8 * | rgba, | |
size_t | numPixels | |||
) | [inline, static] |
Unpack a RGBA byte array into an array of csRGBcolor.
Alpha information is discarded!
- Remarks:
- Allocates memory. Free it using delete[] when finished.
- Parameters:
-
rgba Source array of RGBA data numPixels Number of pixels in the array
- Returns:
- An array containing the source data in csRGBcolor structs.
static const csRGBpixel* csPackRGBA::UnpackRGBAtoRGBpixel | ( | const uint8 * | rgba, | |
size_t | numPixels | |||
) | [inline, static] |
Unpack a RGBA byte array into an array of csRGBpixel.
- Remarks:
- May return
pixels
. May allocate memory. Free it using DiscardUnpackedRGBpixel() when finished.
- Parameters:
-
rgba Source array of RGBA data numPixels Number of pixels in the array
- Returns:
- An array containing the source data in csRGBpixel structs.
static void csPackRGBA::UnpackRGBAtoRGBpixel | ( | csRGBpixel * | buf, | |
const uint8 * | rgba, | |||
size_t | numPixels | |||
) | [inline, static] |
Unpack a RGBA byte array into an array of csRGBpixel.
- Parameters:
-
buf Buffer to unpack the data into. rgba Source array of RGBA data numPixels Number of pixels in the array
The documentation for this struct was generated from the following file:
- csgfx/packrgb.h
Generated for Crystal Space 2.0 by doxygen 1.6.1