134 bool bHasTransparentColor,
210 static void Reverse15(
unsigned short *pPixels,
int nCount);
220 static void Reverse24(
unsigned char *pPixels,
int nCount);
230 static void Reverse32(
unsigned char *pPixels,
int nCount);
ABitmapColorKey
Colour key choices ABitmap::ApplyColorKey() takes.
Definition abitmap.h:32
@ kABitmapColorKeyBlack
Definition abitmap.h:34
@ kABitmapColorKeyWhite
Definition abitmap.h:33
ABitmapFormat
Pixel layout code stored in ABitmap::mFormat.
Definition abitmap.h:21
@ kABitmapFormatCount
Definition abitmap.h:28
@ kABitmapFormatLinear15
Definition abitmap.h:24
@ kABitmapFormatLinear24
Definition abitmap.h:25
@ kABitmapFormatLinear4
Definition abitmap.h:22
@ kABitmapFormatLinear8
Definition abitmap.h:23
@ kABitmapFormatRle8
Definition abitmap.h:27
@ kABitmapFormatLinear32
Definition abitmap.h:26
int g_nSkipColorSwap
Non-zero to leave bitmap colours in file order rather than swapping red and blue.
const unsigned char g_abBitmapBitsPerPixel[kABitmapFormatCount]
Bits one pixel of each ABitmapFormat occupies.
unsigned short mOddNibbleStart
Definition abitmap.h:303
unsigned short mUnused
Definition abitmap.h:304
int mByteCount
Definition abitmap.h:309
static int ComputeByteCount(int nFormat, int nWidth, int nHeight)
Return the size of a pixel rectangle in bytes, with rows packed at the format's own stride.
short mHeight
Definition abitmap.h:306
unsigned int mTransparentColor
Definition abitmap.h:308
ABitmap(void *pPixels, int nFormat, bool bHasTransparentColor, int nWidth, int nHeight, int nBytesPerRow)
Describe a pixel rectangle, allocating the pixels when the caller supplies none.
void * mPixels
Definition abitmap.h:299
static void Reverse15(unsigned short *pPixels, int nCount)
Exchange the red and blue fields of a run of 1555 pixels in place.
static int Bpp2Format(int nBitsPerPixel)
Return the ABitmapFormat code for a pixel width in bits.
unsigned short mOwnsPixels
Definition abitmap.h:302
ABitmap(const ABitmap &source, int nX, int nY, int nWidth, int nHeight)
Describe a rectangle inside another bitmap, sharing its pixels.
void SetPaletteEntries(const unsigned int *pEntries, int nFirst, int nCount)
Set or replace a run of palette entries, allocating the palette on first use.
short mWidth
Definition abitmap.h:305
void SwapRedBlue()
Exchange red and blue throughout the bitmap, or throughout its palette.
unsigned short mFormat
Definition abitmap.h:301
void SetPaletteAlphaFromLowByte(int bWhiten)
Copy the low byte of every palette entry into its alpha byte.
unsigned short mHasTransparentColor
Definition abitmap.h:300
static void Reverse24(unsigned char *pPixels, int nCount)
Exchange the first and third byte of a run of three byte pixels in place.
static void Reverse32(unsigned char *pPixels, int nCount)
Exchange the first and third byte of a run of four byte pixels in place.
static const unsigned char bmPixelSize[kABitmapFormatCount]
Bytes one pixel of each ABitmapFormat occupies.
Definition abitmap.h:106
int Clone(ABitmap &source)
Make this bitmap an owning copy of another.
void ApplyColorKey(int nFlags)
Pick a colour key from the flags and rebuild the alpha of every pixel from it.
short mBytesPerRow
Definition abitmap.h:307
APalette * mPalette
Definition abitmap.h:310
A 256 entry colour table an ABitmap points at.
Definition apalette.h:31