Product |
Bitmap |
Manufacturer |
Standard Satellite Forms component |
Website |
|
Source code provided |
Yes |
Platform |
PalmOS |
Sample project(s) |
Res and Bitmap View |
Keywords |
Bitmap |
Bitmap is an extension which allows one to modify, view, and create bitmaps in Satellite Forms.
NOTE: This extension is not supported on PalmOS 5 devices.
Summary
Bitmap allows the developer access to the Palm OS® Bitmap.h API. Through this extension one can modify, create and display bitmaps. This extension must be used in conjunction with the Resource Extension.
Parameters
BitmapValue
1 – width
2 - height
3 – row size in bytes
4 – pixel size
5 - version
6 – next depth offset
7 – transparent index
8 – compression type
BitDepth
1 – one bit depth (monochrome)
2 – two bit depth (4 grayscale)
4 – four bit depth (16 grayscale)
8 – eight bit depth (256 colors)
Scripts API
The following methods are accessible from the scripting language. About() is the only private method.
Usage: [Name of Method]
Example of usage: BV_GetResPointer()
About()
Show extension's about box.
BV_Bitsize()
Return the current bitmap's bit size.
BV_ColorTableSize()
Return the bitmap's color table size.
BV_Compress()
Compress the bitmap.
BV_Create(integer, integer, integer, integer)
Creates a bitmap structure.
Example of usage: BV_Create(width, height, BitDepth, UseColorTable). BitDepth must be 1, 2, 4, or 8.
Returns TRUE if successful.
BV_CreateBitmapWindow()
Creates an offscreen bitmap window. Returns TRUE if successful.
BV_ColorTableEntries()
This method does nothing right now.
BV_Delete()
Does nothing right now.
BV_DeleteWindow()
Deletes the offscreen window and sets the current drawing window to the previous drawing window.
BV_DrawBitmap(integer, integer)
Draws the current bitmap to the screen at the position specified.
Example of usage: BV_DrawBitmap(X_Coord, Y_Coord).
BV_GetBits()
Gets the current bitmap's data.
BV_GetColorTable()
Gets the color table data.
BV_GetResPointer(integer)
Get the current open resource's pointer from Puma's Resource Manager. Always call this first when grabbing a resource from the Resource Extension. Example of usage: BV_GetResPointer(RM_GetResPtr).
BV_GetWinBitmap()
Grabs the current drawing window and returns it as a bitmap.
BV_ISROM35()
Checks to see if the current handheld has OS 3.5.
BV_ModifyBitmapVaule(integer, integer)
Changes the corresponding bitmap value and returns the previous value. Be very careful in modifying bitmap values as modifying a value improperly could lead to potential crashes.
Example of usage: PrevValue = BV_ModifyBitmapValue(BitmapValue, 29).
BV_PaintBitmap(integer, integer)
Draws the current bitmap to the screen. Use this one if the bitmap has its own color table.
Example of usage: BV_DrawBitmap(X_Coord, Y_Coord).
BV_ReleaseBitmap()
Detaches Bitmap Extension from pointer grabbed by BV_GetResPointer. Erases current Bitmap pointer too. Remember, this is no substitute for releasing the resource.
BV_ReturnBitmapValue(integer)
Returns the corresponding bitmap value. See BitmapValue in Parameters above.
Example of usage: Value = BV_ReturnBitmapValue(BitmapValue).
BV_SetWindowBounds(integer, integer, integer, integer, integer)
Sets the offscreen window's bounds.
Example of usage: BV_SetWindowBounds(TopLeftX, TopLeftY, HorExtent, VerExtent) where the first two numbers are coordinates and the last two numbers are widths and heights respectively.
BV_Size()
Returns the size of the current bitmap.
BV_WinSetDrawWindow()
Sets the offscreen window as the current drawing window.
DocID: 10131 DocDate: 2005-07-18