Calcbitmapsize - Texas Instruments TI-89 Developer's Manual

Graphing calculator
Hide thumbs Also See for TI-89:
Table of Contents

Advertisement

Appendix A: System Routines — Windows

CalcBitmapSize

Declaration:
WORD CalcBitmapSize (BITMAP * bitmapPtr )
Category(ies):
Windows
Description:
Calculate a BITMAP size given a pointer to a BITMAP structure.
Inputs:
bitmapPtr — Pointer to BITMAP structure.
Outputs:
Size in bytes of a BITMAP pointed to by bitmapPtr.
typedef struct {
}
Assumptions:
Compare this routine with WinBitmapSize and WinBitmapSizeExt which
compute the size of a BITMAP if it were pulled out of a given window.
None
Side Effects:
Availability:
On AMS 2.00 and higher.
TI-89 / TI-92 Plus
Differences:
None
See Also:
WinBitmapSize, WinBitmapSizeExt, WinGetBitmap, WinPutBitmap
Example:
/* Return HANDLE of the copy of a BITMAP or H_NULL if not enough memory */
HANDLE BitmapCopy( BITMAP *bPtr )
{
HANDLE hCopy;
WORD size = CalcBitmapSize( bPtr );
if (hCopy = HeapAlloc( size ))
memcpy( HeapDeref(hCopy), bPtr, size );
return hCopy;
}
TI-89 / TI-92 Plus Developer Guide
WORD NumRows;
WORD NumCols;
BYTE Data[1];
BITMAP;
Not for Distribution
1145
Beta Version January 26, 2001

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Ti-92 plusTi-92 plus

Table of Contents