I actually am using that less-favored method, simply clipping the larger bitmap onto the screen, the screen being a "view" onto the bmp...
...I haven't run-into problems yet, but I'm still concerned about performance. Due to its inelegance, I want to "ding" the clipping method but when I consider "cropping" the image before the copy, I wonder which is less efficient! Of course you can get your cropped version into a buffer and never crop in a core loop...but the caveman clipping method seems fast enough for core anyways! Thought anyone? Anyone had to make critical efficiency decisions in this matter? TIA! gary douglas artist/unhacker nth gen labs --- Logan Shaw <[EMAIL PROTECTED]> wrote: > "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/ > ===== Gary Douglas, CISSP Unhacker and artist [EMAIL PROTECTED] Void where prohibited. Foreign currency not accepted. Celebrity voices impersonated. Artist's conception. Serving suggestion. Lost ticket pays maximum rate. Not an exit. Cut along dotted line. Not a meat product. If rash develops, discontinue use. Insert quarter to continue. Do not eat. -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
