Logo Search packages:      
Sourcecode: scummvm version File versions  Download package

Public Member Functions | Static Public Member Functions | Public Attributes

Graphics::PixelFormat Struct Reference

#include <pixelformat.h>

List of all members.

Public Member Functions

byte aBits () const
uint aMax () const
uint32 ARGBToColor (uint8 a, uint8 r, uint8 g, uint8 b) const
byte bBits () const
uint bMax () const
void colorToARGB (uint32 color, uint8 &a, uint8 &r, uint8 &g, uint8 &b) const
void colorToRGB (uint32 color, uint8 &r, uint8 &g, uint8 &b) const
byte gBits () const
uint gMax () const
bool operator!= (const PixelFormat &fmt) const
bool operator== (const PixelFormat &fmt) const
 PixelFormat (byte BytesPerPixel, byte RBits, byte GBits, byte BBits, byte ABits, byte RShift, byte GShift, byte BShift, byte AShift)
byte rBits () const
uint32 RGBToColor (uint8 r, uint8 g, uint8 b) const
uint rMax () const

Static Public Member Functions

static PixelFormat createFormatCLUT8 ()

Public Attributes

byte aLoss
byte aShift
byte bLoss
byte bShift
byte bytesPerPixel
byte gLoss
byte gShift
byte rLoss
byte rShift

Detailed Description

A pixel format description.

Like ColorMasks it includes the given values to create colors from RGB values and to retrieve RGB values from colors.

Unlike ColorMasks it is not dependend on knowing the exact pixel format on compile time.

A minor difference between ColorMasks and PixelFormat is that ColorMasks stores the bit count per channel in 'kFooBits', while PixelFormat stores the loss compared to 8 bits per channel in 'Loss'. It also doesn't contain mask values.

Definition at line 47 of file pixelformat.h.


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

Generated by  Doxygen 1.6.0   Back to index