CrystalSpace

Public API Reference

csPackRGBA Struct Reference
[Graphics]

RGBA data packing. More...

#include <csgfx/packrgb.h>

List of all members.

Static Public Member Functions

static csRGBpixelCopyUnpackRGBAtoRGBpixel (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 void PackRGBpixelToRGBA (uint8 *buf, const csRGBpixel *pixels, size_t numPixels)
 Pack an array of csRGBpixel into a RGBA byte array.
static const uint8PackRGBpixelToRGBA (const csRGBpixel *pixels, size_t numPixels)
 Pack an array of csRGBpixel into a RGBA byte array.
static csRGBcolorUnpackRGBAtoRGBcolor (const uint8 *rgba, size_t numPixels)
 Unpack a RGBA byte array into an array of csRGBcolor.
static void UnpackRGBAtoRGBpixel (csRGBpixel *buf, const uint8 *rgba, size_t numPixels)
 Unpack a RGBA byte array into an array of csRGBpixel.
static const csRGBpixelUnpackRGBAtoRGBpixel (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.

Definition at line 333 of file packrgb.h.

static void csPackRGBA::csDiscardUnpackedRGBpixel ( const csRGBpixel pixels  )  [inline, static]

Frees memory possibly allocated by UnpackRGBAtoRGBpixel().

Parameters:
pixels Pointer to csRGBpixel array returned by UnpackRGBAtoRGBpixel().

Definition at line 350 of file packrgb.h.

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().

Definition at line 272 of file packrgb.h.

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

Definition at line 229 of file packrgb.h.

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.

Definition at line 256 of file packrgb.h.

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.

Definition at line 364 of file packrgb.h.

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

Definition at line 285 of file packrgb.h.

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.

Definition at line 312 of file packrgb.h.


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

Generated for Crystal Space 1.4.1 by doxygen 1.7.1