GPS4Palm

Source Code Documentation


BitmapRsrc.c File Reference

#include <PalmOS.h>
#include "BitmapRsrc.h"

Include dependency graph for BitmapRsrc.c:

Go to the source code of this file.

Defines

#define DEAD_FILL_BYTE   0xFE
#define ErrIf_(test, message)   ErrFatalDisplayIf(test,message)
#define SimpleVerify_(bmp)   VerifyBitmap(bmp)
#define memNewChunkFlagAllowLarge   0x1000

Functions

SysAppInfoPtr SysGetAppInfo (SysAppInfoPtr *uiAppPP, SysAppInfoPtr *actionCodeAppPP) SYS_TRAP(sysTrapSysGetAppInfo)
BmpRsrcTypeBmpRsrcV0Create (Int16 width, Int16 height)
BmpRsrcTypeBmpRsrcV2Create (Int16 width, Int16 height, Int16 pixelSize, const ColorTableType *ct, const UInt8 *bits)
BmpRsrcTypeBmpRsrcV3Create (Int16 width, Int16 height, Int16 pixelSize, const ColorTableType *ct, const UInt8 *bits, Int16 density, PixelFormatType pixelFormat)
BmpRsrcTypeBmpRsrcCreate (Int16 width, Int16 height, Int16 pixelSize, const ColorTableType *ct, Int16 density, PixelFormatType pixelFormat)
void BmpRsrcDelete (BmpRsrcType *bmp)
Int32 BmpRsrcGetTotalSize (const BmpRsrcType *bmp)
UInt8 * BmpRsrcGetBits (const BmpRsrcType *bmp)
UInt32 BmpRsrcGetTransparentValue (const BmpRsrcType *bmp)
ColorTableType * BmpRsrcGetColorTable (const BmpRsrcType *bmp)
PixelFormatType BmpRsrcGetPixelFormat (const BmpRsrcType *bmp)
void BmpRsrcSetFlag (BmpRsrcType *bmp, BmpRsrcFlagEnum which, Boolean value)
void BmpRsrcSetTransparentValue (BmpRsrcType *bmp, UInt32 value)
void BmpRsrcSetDensity (BmpRsrcType *bmp, Int16 density)
UInt32 BmpRsrcGetPixel (const BmpRsrcType *bmp, Int16 x, Int16 y)
void BmpRsrcSetPixel (BmpRsrcType *bmp, Int16 x, Int16 y, UInt32 value)
UInt32 BmpRsrcBlackPixelValue (const BmpRsrcType *bmp)
UInt32 BmpRsrcWhitePixelValue (const BmpRsrcType *bmp)
IndexedColorType BmpRsrcBlackPixelIndex (const BmpRsrcType *bmp)
IndexedColorType BmpRsrcWhitePixelIndex (const BmpRsrcType *bmp)
const BmpRsrcTypeBmpRsrcGetNextMemberFromFamily (const BmpRsrcType *bmp)
BmpRsrcTypeBmpRsrcCreateIndirectCopy (const BmpRsrcType *bmpRsrc)
BmpRsrcTypeBmpRsrcBestMemberFromFamily (const BmpRsrcType *bmpFamily)


Define Documentation

#define DEAD_FILL_BYTE   0xFE
 

Definition at line 69 of file BitmapRsrc.c.

Referenced by BmpRsrcDelete().

#define ErrIf_ test,
message   )     ErrFatalDisplayIf(test,message)
 

Definition at line 80 of file BitmapRsrc.c.

Referenced by BmpRsrcGetPixel(), BmpRsrcSetDensity(), BmpRsrcSetFlag(), BmpRsrcSetPixel(), BmpRsrcSetTransparentValue(), BmpRsrcV0Create(), BmpRsrcV2Create(), and BmpRsrcV3Create().

#define memNewChunkFlagAllowLarge   0x1000
 

Definition at line 184 of file BitmapRsrc.c.

#define SimpleVerify_ bmp   )     VerifyBitmap(bmp)
 

Definition at line 81 of file BitmapRsrc.c.

Referenced by BmpRsrcBlackPixelIndex(), BmpRsrcBlackPixelValue(), BmpRsrcDelete(), BmpRsrcGetBits(), BmpRsrcGetColorTable(), BmpRsrcGetNextMemberFromFamily(), BmpRsrcGetPixel(), BmpRsrcGetPixelFormat(), BmpRsrcGetTotalSize(), BmpRsrcGetTransparentValue(), BmpRsrcSetDensity(), BmpRsrcSetFlag(), BmpRsrcSetPixel(), BmpRsrcSetTransparentValue(), BmpRsrcWhitePixelIndex(), and BmpRsrcWhitePixelValue().


Function Documentation

BmpRsrcType* BmpRsrcBestMemberFromFamily const BmpRsrcType bmpFamily  ) 
 

Definition at line 1486 of file BitmapRsrc.c.

References BmpRsrcCreateIndirectCopy().

IndexedColorType BmpRsrcBlackPixelIndex const BmpRsrcType bmp  ) 
 

Definition at line 1141 of file BitmapRsrc.c.

References SimpleVerify_.

UInt32 BmpRsrcBlackPixelValue const BmpRsrcType bmp  ) 
 

Definition at line 1107 of file BitmapRsrc.c.

References SimpleVerify_.

BmpRsrcType* BmpRsrcCreate Int16  width,
Int16  height,
Int16  pixelSize,
const ColorTableType *  ct,
Int16  density,
PixelFormatType  pixelFormat
 

Definition at line 535 of file BitmapRsrc.c.

References BmpRsrcV0Create(), BmpRsrcV2Create(), and BmpRsrcV3Create().

Referenced by dobitmap().

BmpRsrcType* BmpRsrcCreateIndirectCopy const BmpRsrcType bmpRsrc  ) 
 

Definition at line 1210 of file BitmapRsrc.c.

References BmpRsrcGetBits(), BmpRsrcGetColorTable(), BmpRsrcGetPixelFormat(), BmpRsrcGetTransparentValue(), BmpRsrcSetFlag(), BmpRsrcSetTransparentValue(), BmpRsrcV2Create(), BmpRsrcV3Create(), BmpRsrcFlagsType::compressed, BmpRsrcV2Type::compressionType, BmpRsrcV3Type::compressionType, BmpRsrcV3Type::flags, kCompressedFlag, kHasTransparencyFlag, kNoDitherFlag, BmpRsrcType::v2, BmpRsrcType::v3, and BmpRsrcV2Type::version.

Referenced by BmpRsrcBestMemberFromFamily().

void BmpRsrcDelete BmpRsrcType bmp  ) 
 

Definition at line 606 of file BitmapRsrc.c.

References BmpRsrcGetTotalSize(), DEAD_FILL_BYTE, and SimpleVerify_.

UInt8* BmpRsrcGetBits const BmpRsrcType bmp  ) 
 

Definition at line 700 of file BitmapRsrc.c.

References BmpRsrcGetColorTable(), BmpRsrcFlagsType::directColor, BmpRsrcV2Type::flags, BmpRsrcV0Type::flags, BmpRsrcFlagsType::hasColorTable, BmpRsrcFlagsType::indirect, BmpRsrcFlagsType::indirectColorTable, SimpleVerify_, BmpRsrcV3Type::size, BmpRsrcType::v0, BmpRsrcType::v2, and BmpRsrcType::v3.

Referenced by BmpRsrcCreateIndirectCopy(), BmpRsrcGetPixel(), BmpRsrcGetTotalSize(), BmpRsrcSetPixel(), and dobitmap().

ColorTableType* BmpRsrcGetColorTable const BmpRsrcType bmp  ) 
 

Definition at line 780 of file BitmapRsrc.c.

References BmpRsrcV2Type::flags, BmpRsrcV3Type::flags, BmpRsrcV0Type::flags, BmpRsrcFlagsType::hasColorTable, BmpRsrcFlagsType::indirectColorTable, SimpleVerify_, BmpRsrcV3Type::size, BmpRsrcType::v0, BmpRsrcType::v1, BmpRsrcType::v2, and BmpRsrcType::v3.

Referenced by BmpRsrcCreateIndirectCopy(), BmpRsrcGetBits(), and BmpRsrcGetTotalSize().

const BmpRsrcType* BmpRsrcGetNextMemberFromFamily const BmpRsrcType bmp  ) 
 

Definition at line 1174 of file BitmapRsrc.c.

References BmpRsrcV3Type::nextBitmapOffset, BmpRsrcV2Type::nextDepthOffset, SimpleVerify_, BmpRsrcType::v2, and BmpRsrcType::v3.

UInt32 BmpRsrcGetPixel const BmpRsrcType bmp,
Int16  x,
Int16  y
 

Definition at line 971 of file BitmapRsrc.c.

References BmpRsrcGetBits(), BmpRsrcGetPixelFormat(), ErrIf_, BmpRsrcV0Type::height, kCompressedFlag, SimpleVerify_, BmpRsrcType::v0, and BmpRsrcV0Type::width.

PixelFormatType BmpRsrcGetPixelFormat const BmpRsrcType bmp  ) 
 

Definition at line 822 of file BitmapRsrc.c.

References BmpRsrcV3Type::pixelFormat, BmpRsrcV2Type::pixelSize, SimpleVerify_, BmpRsrcType::v2, and BmpRsrcType::v3.

Referenced by BmpRsrcCreateIndirectCopy(), BmpRsrcGetPixel(), BmpRsrcSetPixel(), and dobitmap().

Int32 BmpRsrcGetTotalSize const BmpRsrcType bmp  ) 
 

Definition at line 627 of file BitmapRsrc.c.

References BmpRsrcGetBits(), BmpRsrcGetColorTable(), BmpRsrcFlagsType::compressed, BmpRsrcFlagsType::directColor, BmpRsrcV2Type::flags, BmpRsrcV0Type::flags, BmpRsrcFlagsType::hasColorTable, BmpRsrcV0Type::height, BmpRsrcFlagsType::indirect, BmpRsrcFlagsType::indirectColorTable, BmpRsrcV0Type::rowBytes, SimpleVerify_, BmpRsrcV3Type::size, BmpRsrcType::v0, BmpRsrcType::v2, BmpRsrcType::v3, and BmpRsrcV2Type::version.

Referenced by BmpRsrcDelete().

UInt32 BmpRsrcGetTransparentValue const BmpRsrcType bmp  ) 
 

Definition at line 742 of file BitmapRsrc.c.

References BmpRsrcV2Type::pixelSize, SimpleVerify_, BmpRsrcV2Type::transparentIndex, BmpRsrcV3Type::transparentValue, BmpRsrcType::v2, and BmpRsrcType::v3.

Referenced by BmpRsrcCreateIndirectCopy().

void BmpRsrcSetDensity BmpRsrcType bmp,
Int16  density
 

Definition at line 939 of file BitmapRsrc.c.

References BmpRsrcV3Type::density, ErrIf_, SimpleVerify_, and BmpRsrcType::v3.

void BmpRsrcSetFlag BmpRsrcType bmp,
BmpRsrcFlagEnum  which,
Boolean  value
 

Definition at line 846 of file BitmapRsrc.c.

References ErrIf_, BmpRsrcV0Type::flags, kHasTransparencyFlag, kNoDitherFlag, SimpleVerify_, and BmpRsrcType::v0.

Referenced by BmpRsrcCreateIndirectCopy().

void BmpRsrcSetPixel BmpRsrcType bmp,
Int16  x,
Int16  y,
UInt32  value
 

Definition at line 1036 of file BitmapRsrc.c.

References BmpRsrcGetBits(), BmpRsrcGetPixelFormat(), ErrIf_, BmpRsrcV0Type::height, kCompressedFlag, SimpleVerify_, BmpRsrcType::v0, and BmpRsrcV0Type::width.

void BmpRsrcSetTransparentValue BmpRsrcType bmp,
UInt32  value
 

Definition at line 887 of file BitmapRsrc.c.

References b, ErrIf_, g, BmpRsrcV2Type::pixelSize, r, SimpleVerify_, BmpRsrcV2Type::transparentIndex, BmpRsrcV3Type::transparentValue, BmpRsrcType::v2, and BmpRsrcType::v3.

Referenced by BmpRsrcCreateIndirectCopy().

BmpRsrcType* BmpRsrcV0Create Int16  width,
Int16  height
 

Definition at line 221 of file BitmapRsrc.c.

References ErrIf_, BmpRsrcV0Type::height, BmpRsrcV0Type::rowBytes, and BmpRsrcV0Type::width.

Referenced by BmpRsrcCreate().

BmpRsrcType* BmpRsrcV2Create Int16  width,
Int16  height,
Int16  pixelSize,
const ColorTableType *  ct,
const UInt8 *  bits
 

Definition at line 257 of file BitmapRsrc.c.

References BmpRsrcFlagsType::directColor, ErrIf_, BmpRsrcV2Type::flags, BmpRsrcFlagsType::hasColorTable, BmpRsrcV2Type::height, BmpRsrcFlagsType::indirect, BmpRsrcV2Type::pixelSize, BmpRsrcV2Type::rowBytes, BmpRsrcV2Type::version, and BmpRsrcV2Type::width.

Referenced by BmpRsrcCreate(), and BmpRsrcCreateIndirectCopy().

BmpRsrcType* BmpRsrcV3Create Int16  width,
Int16  height,
Int16  pixelSize,
const ColorTableType *  ct,
const UInt8 *  bits,
Int16  density,
PixelFormatType  pixelFormat
 

Definition at line 385 of file BitmapRsrc.c.

References BmpRsrcV3Type::density, BmpRsrcFlagsType::directColor, ErrIf_, BmpRsrcV3Type::flags, BmpRsrcFlagsType::hasColorTable, BmpRsrcV3Type::height, BmpRsrcFlagsType::indirect, BmpRsrcV3Type::pixelFormat, BmpRsrcV3Type::pixelSize, BmpRsrcV3Type::rowBytes, BmpRsrcV3Type::size, BmpRsrcV3Type::version, and BmpRsrcV3Type::width.

Referenced by BmpRsrcCreate(), BmpRsrcCreateIndirectCopy(), and dobitmap().

IndexedColorType BmpRsrcWhitePixelIndex const BmpRsrcType bmp  ) 
 

Definition at line 1158 of file BitmapRsrc.c.

References SimpleVerify_.

UInt32 BmpRsrcWhitePixelValue const BmpRsrcType bmp  ) 
 

Definition at line 1124 of file BitmapRsrc.c.

References SimpleVerify_.

SysAppInfoPtr SysGetAppInfo SysAppInfoPtr *  uiAppPP,
SysAppInfoPtr *  actionCodeAppPP
 


Created: Mon, 08 Oct 2007 22:33:16 +0200
Copyright ©2004 M. Prinke