Bitmaps on PalmOS

Bitmap drawing on PalmOS can be… fun. Specially when you are trying to emulate what the real OS might be doing. Let’s see what can affect the result:

  1. Bitmap density: low, double.
  2. Bitmap depth: 1, 2, 4, 8, 16.
  3. Screen density: low, double.
  4. Screen depth: 1, 2, 4, 8, 16.
  5. Coordinate system: standard, double.
  6. Draw operation: paint, erase, mask, invert, overlay, paint inverse, swap.

icons

Not every combination may be valid, but these alone account for a few hundred cases. Add to the mix four different bitmap versions and three different window formats. And bitmaps can have their own color table, different from the system color table. And they can have an optional transparency color index or transparency color value, depending on its version/depth. Oh, and do not forget to consider the active clipping region, if any. Did I mention there are also other high density API’s from HandEra and Sony?

As you may know, I am implementing portions of the PalmOS API on top of a modern OS. I got most of the cases described here covered, but things like BmpGetBits() and WinScreenLock() are not going to be supported for now.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s