Public Member Functions | |
| CBofBitmap () | |
| CBofBitmap (int dx, int dy, CBofPalette *pPalette, bool bOwnPalette=false, byte *pPrivateBuff=nullptr) | |
| CBofBitmap (const char *pszFileName, CBofPalette *pPalette=nullptr, bool bOwnPalette=false) | |
| virtual | ~CBofBitmap () |
| ErrorCode | buildBitmap (CBofPalette *pPalette) |
| ErrorCode | loadBitmap (const char *pszFileName, CBofPalette *pPalette) |
| void | releaseBitmap () |
| void | setPalette (CBofPalette *pPalette, bool bOwnPalette=false) |
| CBofPalette * | getPalette () |
| void | setIsOwnPalette (bool own) |
| byte * | getPixelAddress (int x, int y) |
| byte * | getPixelAddress (CBofPoint *pPoint) |
| CBofSize | getSize () |
| CBofRect | getRect () |
| void | setReadOnly (bool bReadOnly) |
| bool | getReadOnly () |
| bool | isTopDown () |
| int | width () |
| int | widthBytes () |
| int | height () |
| operator Graphics::ManagedSurface & () | |
| Graphics::ManagedSurface | getSurface () |
| const char * | getFileName () |
| ErrorCode | paint (CBofWindow *pWnd, int x, int y, CBofRect *pSrcRect=nullptr, int nMaskColor=NOT_TRANSPARENT) |
| ErrorCode | paint (CBofWindow *pWnd, CBofRect *pDstRect=nullptr, CBofRect *pSrcRect=nullptr, int nMaskColor=NOT_TRANSPARENT) |
| ErrorCode | paintMaskBackdrop (CBofWindow *pWnd, CBofRect *pDstRect=nullptr, CBofRect *pSrcRect=nullptr, int nMaskColor=NOT_TRANSPARENT) |
| ErrorCode | paint (CBofBitmap *pBmp, int x, int y, CBofRect *pSrcRect=nullptr, int nMaskColor=NOT_TRANSPARENT) |
| ErrorCode | paint (CBofBitmap *pBmp, CBofRect *pDstRect=nullptr, CBofRect *pSrcRect=nullptr, int nMaskColor=NOT_TRANSPARENT) |
| ErrorCode | paintStretch4 (CBofBitmap *pBmp, CBofRect *pDstRect, CBofRect *pSrcRect) |
| The Destination rectangle MUST be divisible by 4. Both bitmaps must be Bottom-Up. The Source must be smaller than the Destination. More... | |
| ErrorCode | paintStretchOpt (CBofBitmap *pBmp, CBofRect *pDstRect, CBofRect *pSrcRect, int nOptSize) |
| ErrorCode | paint1To1 (CBofBitmap *pBmp) |
| ErrorCode | captureScreen (CBofWindow *pWnd, CBofRect *pSrcRect, CBofRect *pDstRect=nullptr) |
| ErrorCode | fadeIn (CBofWindow *pWnd, int x=0, int y=0, int nMaskColor=NOT_TRANSPARENT, int nBlockSize=4, int nSpeed=10) |
| ErrorCode | curtain (CBofWindow *pWnd, int nSpeed=8, int nMaskColor=NOT_TRANSPARENT) |
| ErrorCode | fadeLines (CBofWindow *pWnd, int nSpeed=32, int nMaskColor=NOT_TRANSPARENT) |
| byte | readPixel (int x, int y) |
| void | writePixel (int x, int y, byte iColor) |
| void | circle (int x, int y, uint16 nRadius, byte iColor) |
| void | line (int nSrcX, int nSrcY, int nDstX, int nDstY, byte iColor) |
| void | line (CBofPoint *pSrc, CBofPoint *pDest, byte iColor) |
| void | drawRect (CBofRect *cRect, byte iColor) |
| void | fillRect (CBofRect *cRect, byte iColor) |
| ErrorCode | scrollRight (int nPixels, CBofRect *pRect=nullptr) |
| ErrorCode | scrollLeft (int nPixels, CBofRect *pRect=nullptr) |
| ErrorCode | scrollUp (int nPixels) |
Public Member Functions inherited from Bagel::CBofError | |
| void | reportError (ErrorCode errCode, const char *format,...) |
| bool | errorOccurred () const |
| ErrorCode | getErrorCode () const |
| void | clearError () |
Public Member Functions inherited from Bagel::CBofObject | |
| virtual void | DeleteObject () |
Public Member Functions inherited from Bagel::CCache | |
| CCache () | |
| virtual | ~CCache () |
| void | load () |
| bool | release () |
| void | lock () |
| void | unlock () |
| bool | isLocked () |
Static Public Member Functions | |
| static void | setUseBackdrop (bool b) |
| static bool | getUseBackdrop () |
Static Public Member Functions inherited from Bagel::CBofError | |
| static void | fatalError (ErrorCode errCode, const char *format,...) |
| static void | initialize () |
| static int | getErrorCount () |
Static Public Member Functions inherited from Bagel::CBofObject | |
| static bool | isValidObject (const CBofObject *pObject) |
Static Public Member Functions inherited from Bagel::CCache | |
| static void | initialize () |
| static bool | flush () |
| static bool | optimize (uint32 lRequestedFreeSpace) |
Protected Member Functions | |
| bool | alloc () override |
| void | free () override |
Protected Member Functions inherited from Bagel::CBofError | |
| virtual void | bofMessageBox (const Common::String &content, const Common::String &title) |
Protected Attributes | |
| char | _szFileName [MAX_FNAME] |
| Graphics::ManagedSurface | _bitmap |
| byte * | _pBits = nullptr |
| CBofPalette * | _pPalette = nullptr |
| int | _nScanDX = 0 |
| int | _nDX = 0 |
| int | _nDY = 0 |
| bool | _bTopDown = false |
| bool | _bOwnPalette = false |
| bool | _bReadOnly = false |
| bool | _bInitialized = false |
Protected Attributes inherited from Bagel::CBofError | |
| ErrorCode | _errCode |
Static Protected Attributes | |
| static bool | _bUseBackdrop |
Static Protected Attributes inherited from Bagel::CBofError | |
| static int | _count |
| Bagel::SpaceBar::CBofBitmap::CBofBitmap | ( | ) |
Default constructor
| Bagel::SpaceBar::CBofBitmap::CBofBitmap | ( | int | dx, |
| int | dy, | ||
| CBofPalette * | pPalette, | ||
| bool | bOwnPalette = false, |
||
| byte * | pPrivateBuff = nullptr |
||
| ) |
Constructs a CBofBitmap
| dx | Width of new bitmap |
| dy | Height of new bitmap |
| pPalette | Palette to use for this bitmap |
| bOwnPalette | true if destructor should delete palette |
| pPrivateBuff |
| Bagel::SpaceBar::CBofBitmap::CBofBitmap | ( | const char * | pszFileName, |
| CBofPalette * | pPalette = nullptr, |
||
| bool | bOwnPalette = false |
||
| ) |
Constructs a CBofBitmap
| pszFileName | Path and Filename for Bitmap on disk |
| pPalette | Palette to use for this bitmap |
| bOwnPalette | true if destructor should delete palette |
|
virtual |
Destructor
|
overrideprotectedvirtual |
Does the actual allocation for this bitmap
Implements Bagel::CCache.
|
overrideprotectedvirtual |
Frees the data used by this bitmap (removes from cache)
Implements Bagel::CCache.
| ErrorCode Bagel::SpaceBar::CBofBitmap::buildBitmap | ( | CBofPalette * | pPalette | ) |
Allocates the structures needed for a CBofBitmap
| pPalette | Palette to be assigned into this bitmap |
| ErrorCode Bagel::SpaceBar::CBofBitmap::loadBitmap | ( | const char * | pszFileName, |
| CBofPalette * | pPalette | ||
| ) |
Loads the specified bitmap from disk
| pszFileName | Filename |
| pPalette | Palette |
| void Bagel::SpaceBar::CBofBitmap::releaseBitmap | ( | ) |
Frees the data used by this bitmap
| void Bagel::SpaceBar::CBofBitmap::setPalette | ( | CBofPalette * | pPalette, |
| bool | bOwnPalette = false |
||
| ) |
Assigns specified palette to this bitmap
| pPalette | Pointer to CBofPalette to be assigned |
| bOwnPalette | true if bitmap is to own this palette |
| byte* Bagel::SpaceBar::CBofBitmap::getPixelAddress | ( | int | x, |
| int | y | ||
| ) |
Returns the bit address of the (x, y) location in this bmp
| x | Column in _pBits |
| y | Row in _pBits |
| const char* Bagel::SpaceBar::CBofBitmap::getFileName | ( | ) |
Returns current bitmap's filename (if any)
| ErrorCode Bagel::SpaceBar::CBofBitmap::paint | ( | CBofWindow * | pWnd, |
| int | x, | ||
| int | y, | ||
| CBofRect * | pSrcRect = nullptr, |
||
| int | nMaskColor = NOT_TRANSPARENT |
||
| ) |
Paints some or all of the bitmap directly to the screen
| pWnd | Destination device for painting |
| x | Destination column |
| y | Destination row |
| pSrcRect | Source rectangle from bitmap |
| nMaskColor | Transparency color |
| ErrorCode Bagel::SpaceBar::CBofBitmap::paint | ( | CBofWindow * | pWnd, |
| CBofRect * | pDstRect = nullptr, |
||
| CBofRect * | pSrcRect = nullptr, |
||
| int | nMaskColor = NOT_TRANSPARENT |
||
| ) |
Paints some or all of the bitmap directly to the screen
| pWnd | Destination Device to paint to |
| pDstRect | Destination rectangle (for stretching) |
| pSrcRect | Source rectangle from bitmap |
| nMaskColor | transparency color |
| ErrorCode Bagel::SpaceBar::CBofBitmap::paintMaskBackdrop | ( | CBofWindow * | pWnd, |
| CBofRect * | pDstRect = nullptr, |
||
| CBofRect * | pSrcRect = nullptr, |
||
| int | nMaskColor = NOT_TRANSPARENT |
||
| ) |
Paints some or all of the bitmap directly to the screen
| pWnd | Destination Device to paint to |
| pDstRect | Destination rectangle (for stretching) |
| pSrcRect | Source rectangle from bitmap |
| nMaskColor | Transparency color |
| ErrorCode Bagel::SpaceBar::CBofBitmap::paint | ( | CBofBitmap * | pBmp, |
| int | x, | ||
| int | y, | ||
| CBofRect * | pSrcRect = nullptr, |
||
| int | nMaskColor = NOT_TRANSPARENT |
||
| ) |
Paints some or all of the bitmap directly to the screen
| pBmp | Destination bitmap to paint to |
| x | Destination column |
| y | Destination row |
| pSrcRect | Source rectangle from bitmap |
| nMaskColor | Transparency color |
| ErrorCode Bagel::SpaceBar::CBofBitmap::paint | ( | CBofBitmap * | pBmp, |
| CBofRect * | pDstRect = nullptr, |
||
| CBofRect * | pSrcRect = nullptr, |
||
| int | nMaskColor = NOT_TRANSPARENT |
||
| ) |
Paints some or all of the bitmap directly to the screen
| pBmp | Destination bitmap to paint to |
| pDstRect | Destination rectangle (for stretching) |
| pSrcRect | Source rectangle from bitmap |
| nMaskColor | Transparency color |
| ErrorCode Bagel::SpaceBar::CBofBitmap::paintStretch4 | ( | CBofBitmap * | pBmp, |
| CBofRect * | pDstRect, | ||
| CBofRect * | pSrcRect | ||
| ) |
The Destination rectangle MUST be divisible by 4. Both bitmaps must be Bottom-Up. The Source must be smaller than the Destination.
Stretches 4 pixel wide strips from source to destination
| pBmp | Destination bitmap to paint to |
| pDstRect | Destination rectangle (for stretching) |
| pSrcRect | Source rectangle from bitmap |
| ErrorCode Bagel::SpaceBar::CBofBitmap::paintStretchOpt | ( | CBofBitmap * | pBmp, |
| CBofRect * | pDstRect, | ||
| CBofRect * | pSrcRect, | ||
| int | nOptSize | ||
| ) |
Stretches a multiple of 4 pixel wide strips from source to destination
| pBmp | Destination bitmap to paint to |
| pDstRect | Destination rectangle (for stretching) |
| pSrcRect | Source rectangle from bitmap |
| nOptSize |
| ErrorCode Bagel::SpaceBar::CBofBitmap::paint1To1 | ( | CBofBitmap * | pBmp | ) |
Paints some or all of the bitmap directly to the screen
| pBmp | Destination bitmap to paint to |
| ErrorCode Bagel::SpaceBar::CBofBitmap::captureScreen | ( | CBofWindow * | pWnd, |
| CBofRect * | pSrcRect, | ||
| CBofRect * | pDstRect = nullptr |
||
| ) |
Copy specified section of screen (or window) to bitmap.
| pWnd | Window to capture |
| pSrcRect | Source rectangle in window |
| pDstRect | Destination area to copy image to |
| ErrorCode Bagel::SpaceBar::CBofBitmap::fadeIn | ( | CBofWindow * | pWnd, |
| int | x = 0, |
||
| int | y = 0, |
||
| int | nMaskColor = NOT_TRANSPARENT, |
||
| int | nBlockSize = 4, |
||
| int | nSpeed = 10 |
||
| ) |
Performs a "Fade" onto the specified window
| pWnd | Pointer to window to fade into |
| x | Fade upper left X |
| y | Fade upper left Y |
| nMaskColor | Transparency color (if any) |
| nBlockSize | Size of Fade Blocks |
| nSpeed | Speed for fade (not implemented yet) |
| byte Bagel::SpaceBar::CBofBitmap::readPixel | ( | int | x, |
| int | y | ||
| ) |
Returns the color at the (x, y) location in this bmp
| x | X position |
| y | Y position |
| void Bagel::SpaceBar::CBofBitmap::writePixel | ( | int | x, |
| int | y, | ||
| byte | iColor | ||
| ) |
Assigns the specified color to the (x, y) location
| x | X position |
| y | Y position |
| iColor | Pixel value |
| void Bagel::SpaceBar::CBofBitmap::circle | ( | int | x, |
| int | y, | ||
| uint16 | nRadius, | ||
| byte | iColor | ||
| ) |
Writes a circle into this bitmap
| x | X center position |
| y | Y center position |
| nRadius | Radius of circle |
| iColor | Pixel value |
| void Bagel::SpaceBar::CBofBitmap::line | ( | int | nSrcX, |
| int | nSrcY, | ||
| int | nDstX, | ||
| int | nDstY, | ||
| byte | iColor | ||
| ) |
Writes a line into this bitmap
| nSrcX | Endpoint 1 x |
| nSrcY | Endpoint 1 y |
| nDstX | Endpoint 2 x |
| nDstY | Endpoint 2 y |
| iColor | Pixel value |
Writes a line into this bitmap
| pSrc | Endpoint 1 |
| pDest | Endpoint 2 |
| iColor | Pixel value |
| void Bagel::SpaceBar::CBofBitmap::drawRect | ( | CBofRect * | cRect, |
| byte | iColor | ||
| ) |
Writes a Rectangle into this bitmap
| cRect | Pointer to rectangle Coordinates |
| iColor | Color of rectangle |
| void Bagel::SpaceBar::CBofBitmap::fillRect | ( | CBofRect * | cRect, |
| byte | iColor | ||
| ) |
Writes a filled in Rectangle to this bitmap
| cRect | Pointer to rectangle Coordinates |
| iColor | Color of rectangle |
| ErrorCode Bagel::SpaceBar::CBofBitmap::scrollRight | ( | int | nPixels, |
| CBofRect * | pRect = nullptr |
||
| ) |
Scrolls current bitmap horizontally
| nPixels | Number of pixels to scroll by |
| pRect | Section of bitmap to scroll |
| ErrorCode Bagel::SpaceBar::CBofBitmap::scrollUp | ( | int | nPixels | ) |
Scrolls current bitmap vertically
| nPixels | Number of pixels to scroll by |