CrystalSpace

Public API Reference

Main Page | Modules | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | File Members | Related Pages

csPackRGBA Struct Reference
[Graphics]

RGBA data packing. More...

#include <csgfx/packrgb.h>

List of all members.

Static Public Member Functions

void PackRGBpixelToRGBA (uint8 *buf, const csRGBpixel *pixels, size_t numPixels)
 Pack an array of csRGBpixel into a RGBA byte array.
const uint8PackRGBpixelToRGBA (const csRGBpixel *pixels, size_t numPixels)
 Pack an array of csRGBpixel into a RGBA byte array.
void DiscardPackedRGBA (const uint8 *rgba)
 Frees memory possibly allocated by PackRGBpixelToRGBA().
void UnpackRGBAtoRGBpixel (csRGBpixel *buf, const uint8 *rgba, size_t numPixels)
 Unpack a RGBA byte array into an array of csRGBpixel.
const csRGBpixelUnpackRGBAtoRGBpixel (const uint8 *rgba, size_t numPixels)
 Unpack a RGBA byte array into an array of csRGBpixel.
csRGBpixelCopyUnpackRGBAtoRGBpixel (const uint8 *rgba, size_t numPixels)
 Unpack a RGBA byte array into an array of csRGBpixel.
void csDiscardUnpackedRGBpixel (const csRGBpixel *pixels)
 Frees memory possibly allocated by UnpackRGBAtoRGBpixel().
csRGBcolorUnpackRGBAtoRGBcolor (const uint8 *rgba, size_t numPixels)
 Unpack a RGBA byte array into an array of csRGBcolor.


Detailed Description

RGBA data packing.

Definition at line 211 of file packrgb.h.


Member Function Documentation

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 324 of file packrgb.h.

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 341 of file packrgb.h.

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 263 of file packrgb.h.

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 247 of file packrgb.h.

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 220 of file packrgb.h.

References csRGBpixel::alpha, csRGBpixel::blue, csRGBpixel::green, and csRGBpixel::red.

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 355 of file packrgb.h.

References csRGBcolor::blue, csRGBcolor::green, and csRGBcolor::red.

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 303 of file packrgb.h.

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 276 of file packrgb.h.

References csRGBpixel::alpha, csRGBpixel::blue, csRGBpixel::green, and csRGBpixel::red.


The documentation for this struct was generated from the following file:
Generated for Crystal Space by doxygen 1.3.9.1