Winbitmapsizeext - Texas Instruments TI-89 Developer's Manual

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

Advertisement

1160

WinBitmapSizeExt

Declaration:
WORD WinBitmapSizeExt (WINDOW * w , const WIN_RECT * WinRect )
Category(ies):
Windows
Description:
Return the size in bytes of a bitmap for a window (may be smaller than the
size of the region defined by WinRect due to clipping). This size includes
the data for the bitmap and the header.
w
Inputs:
WinRect — Defines region of BITMAP to determine size of.
Outputs:
Size of BITMAP defined by WinRect taking clipping into account and
negative coordinates.
Assumptions:
WinBitmapSizeExt will take negative coordinates into account, use
WinBitmapSize if negative coordinates should be clipped to zero.
Side Effects:
None
Availability:
On AMS 2.00 and higher.
TI-89 / TI-92 Plus
Differences:
None
See Also:
CalcBitmapSize, WinBitmapGet, WinBitmapPut, WinBitmapSize
Example:
WINDOW w1;
HANDLE h;
WORD sNormal, sExt;
BITMAP *Bitmap;
WIN_RECT r2 = {-16,-6,30,30};
/*.. assume w1 already opened */
sNormal = WinBitmapSize( &w1, &r2 );
sExt = WinBitmapSizeExt( &w1, &r2 ); /* will be > sNormal */
/* Since r2 has negative coordinates we must use the value from WinBitmapSizeExt to
allocate the bitmap for this example because the WinBitmapGet call will include
these negative portions of the window (the values stored in the bitmap outside the
window may include the windows border, use SetWinClip to exclude the border if
needed).
*/
if ((h = HeapAlloc(sExt)) != H_NULL) {
Bitmap = (BITMAP *) HeapDeref(h);
WinBitmapGet( &w1, &r2, Bitmap );
WinBitmapPut( &w1, 0, 0, Bitmap, A_REPLACE );
HeapFree( h );
}
TI-89 / TI-92 Plus Developer Guide
Appendix A: System Routines — Windows
— WINDOW struct of a previously opened window.
Not for Distribution
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