"Drew Haninger" <[EMAIL PROTECTED]> wrote:
>> any ideas on how to display a portion of a bitmap on Palm OS ?
>>
>> i.e. we want to display the bottom half of a 160 wide by 500 high bitmap.
Ben Combee wrote:
> Draw the whole bitmap to an offscreen window, then copy the portion
> you need using WinCopyRectangle.
Do you mean this type of thing:
BmpGetDimensions()
WinCreateOffscreenWindow() with those dimensions and screen format
WinDrawBitmap() to the offscreen
WinCopyRectangle() from offscreen to regular draw window
WinDeleteWindow() the offscreen
Or do you mean this:
WinCreateBitmapWindow() from the bitmap
WinCopyRectangle() from offscreen to regular draw window
WinDeleteWindow() the offscreen
The reason I'm asking is that it sounds like you're suggesting
the former, but to me the latter seems more efficient (no giant
temporary bitmap) and easier. However, I've never done the latter,
so there might be some caveat I don't know about. (For instance,
can WinCopyRectangle() deal with copying from one bit depth to
another?)
By the way, another way to achieve all this is to set clipping on
the draw window, then draw your bitmap (possibly at coordinates
that are off the screen). But I wouldn't recommend this method,
as it doesn't work quite right on a few older devices.
- Logan
--
For information on using the Palm Developer Forums, or to unsubscribe, please
see http://www.palmos.com/dev/support/forums/