Texas Instruments TI89 Developer Guide - Page 1202
CalcBitmapSize, WinBitmapGet, WinBitmapPut, WinBitmapSize
UPC - 033317198566
View all Texas Instruments TI89 manuals
Add to My Manuals
Save this manual to your list of manuals |
Page 1202 highlights
1160 Appendix A: System Routines - Windows 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. Inputs: w - WINDOW struct of a previously opened window. 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 Not for Distribution Beta Version January 26, 2001