![]()
gePixelFormat
Description: The abstract Pixel primitives
Source file: …\genesis3d\OpenSource\Source\Bitmap\pixelformat.h
Functions:
BytesPerPel, ComposePixel, ConvertPixel, DecomposePixel, Description, GetColor, GetOperations, GetPixel, HasAlpha, HasGoodAlpha, HasPalette, IsRaw, IsValid, PutColor, PutPixelTypes:
gePixelFormat_Composer, gePixelFormat_Decomposer, gePixelFormat_ColorGetter, gePixelFormat_ColorPutter, gePixelFormat_PixelGetter, gePixelFormat_PixelPutter, gePixelFormat_Operations, gePixelFormatConstants:
GE_PIXELFORMAT_8BIT_PALChanges for Genesis3D v1.6: None
![]()
Types:
uint32 (*gePixelFormat_Composer)( int R, int G, int B, int A);Return to Contentsvoid (*gePixelFormat_Decomposer)( uint32 Pixel, int* R, int* G, int* B, int* A);
Return to Contentsvoid (*gePixelFormat_ColorGetter)( uint8** ppData, int* R, int* G, int* B, int* A);
Return to Contentsvoid (*gePixelFormat_ColorPutter)( uint8** ppData, int R, int G, int B, int A);
Return to Contentsuint32 (*gePixelFormat_PixelGetter)( uint8** ppData);
Return to Contentsvoid (*gePixelFormat_PixelPutter)( uint8** ppData, uint32 Pixel);
Return to Contents;
typedef struct gePixelFormat_Operations{
typedef enum{
Notes:
Return to Contents
![]()
Constants:
#define PIXELFORMAT_8BIT_PAL PIXELFORMAT_8BIT
Return to Contents
![]()
Functions:
![]()
GENESISAPI unsigned int GENESISCC gePixelFormat_BytesPerPel(gePixelFormat Format);
This function returns the number of bytes per pixel for the specifiedgePixelFormat.
Returns: the result.
Return to Contents
![]()
GENESISAPI uint32 GENESISCC gePixelFormat_ComposePixel(gePixelFormat Format, int R, int G, int B, int A);
This function produces auint32 pixel of the specified format from the specified (R,G,B,A) parameters.
Returns: the createduint32 pixel.
Return to Contents
![]()
GENESISAPI uint32 GENESISCC gePixelFormat_ConvertPixel(gePixelFormat Format, uint32 Pixel, gePixelFormat ToFormat);
This function converts the givenuint32 pixel Pixel from Format to ToFormat.
Returns: the result
Return to Contents
![]()
GENESISAPI void GENESISCC gePixelFormat_DecomposePixel(gePixelFormat Format, uint32 Pixel, int* R, int* G, int* B, int* A);
This function returns the (R,G,B,A) parameters of Pixel given that Pixel is of pixel format Format.
Returns: nothing.
Return to Contents
![]()
GENESISAPI const char* GENESISCC gePixelFormat_Description(gePixelFormat Format);
This function returns a text description of the givengePixelFormat Format.
Returns: the text description.
Return to Contents
![]()
GENESISAPI void GENESISCC gePixelFormat_GetColor(gePixelFormat Format, uint8** ppData, int* R, int* G, int* B, int* A);
This function returns the (R,G,B,A) parameters of the pixel pointed to by ppData if it is translated as being of Format pixel format and increments ppData by one pixel.
Returns: nothing.
Return to Contents
![]()
GENESISAPI const gePixelFormat_Operations* GENESISCC gePixelFormat_GetOperations(gePixelFormat Format);
This function returns thegePixelFormat_Operations structure for the given pixel format.
Returns: thegePixelFormat_Operations structure.
Return to Contents
![]()
GENESISAPI uint32 GENESISCC gePixelFormat_GetPixel(gePixelFormat Format, uint8** ppData);
This function returns theuint32 pixel pointed to by ppData given that it is stored in Format pixel format and increments ppData by one pixel.
Returns: theuint32 pixel.
Return to Contents
![]()
GENESISAPI geBoolean GENESISCC gePixelFormat_HasAlpha(gePixelFormat Format);
This function tests whether the specifiedgePixelFormat supports Alpha.
Returns:GE_TRUE if it supports Alpha, GE_FALSE otherwise.
Return to Contents
![]()
GENESISAPI geBoolean GENESISCC gePixelFormat_HasGoodAlpha(gePixelFormat Format);
This function checks whether the specifiedgePixelFormat specifies more than one bit of Alpha.
Returns:GE_TRUE if it supports more than one bit of Alpha, GE_FALSE otherwise.
Notes:
Return to Contents
![]()
GENESISAPI geBoolean GENESISCC gePixelFormat_HasPalette(gePixelFormat Format);
This function checks whether the givengePixelFormat is palettized.
Returns:GE_TRUE if pixel format is palettized, GE_FALSE otherwise.
Return to Contents
![]()
GENESISAPI geBoolean GENESISCC gePixelFormat_IsRaw(gePixelFormat Format);
This function tests whether the givengePixelFormat supports the compose functions.
Returns:GE_TRUE if pixel format supports compose, GE_FALSE otherwise.
Notes:
Return to Contents
![]()
GENESISAPI geBoolean GENESISCC gePixelFormat_IsValid(gePixelFormat Format);
This function checks whether the specifiedgePixelFormat is a valid gePixelFormat. I assume this means that it checks whether the constant specified represents a valid gePixelFormat (i.e. listed in the enum).
Returns:GE_TRUE if Format is a valid gePixelFormat, GE_FALSE otherwise.
Return to Contents
![]()
GENESISAPI void GENESISCC gePixelFormat_PutColor(gePixelFormat Format, uint8** ppData, int R, int G, int B, int A);
This function colors the pixel pointed to by ppData (R,G,B,A) utilizing the specifiedgePixelFormat and increments ppData by one pixel.
Returns: nothing.
Return to Contents
![]()
GENESISAPI void GENESISCC gePixelFormat_PutPixel(gePixelFormat Format, uint8** ppData, uint32 Pixel);
This function puts the rawuint32 pixel Pixel into ppData utilizing the gePixelFormat Format and increments ppData by one pixel.
Returns: nothing.
Notes:
![]()