CrystalSpace

Public API Reference

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

csPackRGB Struct Reference
[Graphics]

RGB data packing. More...

#include <csgfx/packrgb.h>

List of all members.

Static Public Member Functions

void PackRGBcolorToRGBBuffer (uint8 *buf, const csRGBcolor *pixels, size_t numPixels)
 Pack an array of csRGBcolor into a RGB byte array.
const uint8 * PackRGBcolorToRGB (const csRGBcolor *pixels, size_t numPixels)
 Pack an array of csRGBcolor into a RGB byte array.
void DiscardPackedRGB (const uint8 *rgb)
 Frees memory possibly allocated by PackRGBcolorToRGB().
void UnpackRGBtoRGBcolor (csRGBcolor *buf, const uint8 *rgb, size_t numPixels)
 Unpack a RGB byte array into an array of csRGBcolor.
const csRGBcolor * UnpackRGBtoRGBcolor (const uint8 *rgb, size_t numPixels)
 Unpack a RGB byte array into an array of csRGBcolor.
void DiscardUnpackedRGBcolor (const csRGBcolor *pixels)
 Frees memory possibly allocated by UnpackRGBtoRGBcolor().
uint8 * PackRGBpixelToRGB (const csRGBpixel *pixels, size_t numPixels)
 Pack an array of csRGBpixel into a RGB byte array.
void UnpackRGBtoRGBpixelBuffer (csRGBpixel *buf, uint8 *rgb, size_t numPixels)
 Unpack a RGB byte array into an array of csRGBpixel.


Detailed Description

RGB data packing.

Definition at line 56 of file packrgb.h.


Member Function Documentation

void csPackRGB::DiscardPackedRGB (  const uint8 *  rgb  )  [inline, static]
 

Frees memory possibly allocated by PackRGBcolorToRGB().

Parameters:
rgb Pointer to packed RGB data returned by PackRGBcolorToRGB().

Definition at line 107 of file packrgb.h.

void csPackRGB::DiscardUnpackedRGBcolor (  const csRGBcolor *  pixels  )  [inline, static]
 

Frees memory possibly allocated by UnpackRGBtoRGBcolor().

Parameters:
pixels Pointer to csRGBcolor array returned by UnpackRGBtoRGBcolor().

Definition at line 160 of file packrgb.h.

const uint8* csPackRGB::PackRGBcolorToRGB (  const csRGBcolor *  pixels,
size_t  numPixels
)  [inline, static]
 

Pack an array of csRGBcolor into a RGB byte array.

Remarks:
May return pixels. May allocate memory. Free it using DiscardPackedRGB() when finished.
Parameters:
pixels Source array of csRGBcolor data
numPixels Number of pixels in the array
Returns:
A byte array containing the source data packed as RGB.

Definition at line 91 of file packrgb.h.

void csPackRGB::PackRGBcolorToRGBBuffer (  uint8 *  buf,
const csRGBcolor *  pixels,
size_t  numPixels
)  [inline, static]
 

Pack an array of csRGBcolor into a RGB byte array.

Parameters:
buf Buffer to pack the data into.
pixels Source array of csRGBcolor data
numPixels Number of pixels in the array

Definition at line 65 of file packrgb.h.

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

uint8* csPackRGB::PackRGBpixelToRGB (  const csRGBpixel *  pixels,
size_t  numPixels
)  [inline, static]
 

Pack an array of csRGBpixel into a RGB byte array.

Alpha information is discarded!

Remarks:
Allocates memory. Free it using delete[] 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 RGB.

Definition at line 174 of file packrgb.h.

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

const csRGBcolor* csPackRGB::UnpackRGBtoRGBcolor (  const uint8 *  rgb,
size_t  numPixels
)  [inline, static]
 

Unpack a RGB byte array into an array of csRGBcolor.

Remarks:
May return pixels. May allocate memory. Free it using sDiscardUnpackedRGBcolor() when finished.
Parameters:
rgb Source array of RGB data
numPixels Number of pixels in the array
Returns:
An array containing the source data in csRGBcolor structs.

Definition at line 144 of file packrgb.h.

void csPackRGB::UnpackRGBtoRGBcolor (  csRGBcolor *  buf,
const uint8 *  rgb,
size_t  numPixels
)  [inline, static]
 

Unpack a RGB byte array into an array of csRGBcolor.

Parameters:
buf Buffer to unpack the data into.
rgb Source array of RGB data
numPixels Number of pixels in the array

Definition at line 118 of file packrgb.h.

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

void csPackRGB::UnpackRGBtoRGBpixelBuffer (  csRGBpixel *  buf,
uint8 *  rgb,
size_t  numPixels
)  [inline, static]
 

Unpack a RGB byte array into an array of csRGBpixel.

Parameters:
buf Buffer to unpack the data into.
rgb Source array of RGB data
numPixels Number of pixels in the array

Definition at line 194 of file packrgb.h.

References 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