When I say it looks garbled, I think it is trying to draw the bitmap as if it were drawing it into a 4-bit (the native depth, it's a Zire 21) window. It's like it thinks it has to convert the bitmap to 4-bit and then blit it to the window. But, it's not a 4-bit window, I created the offscreen window with a 1-bit bitmap.
The reason I suspect this is because it draws stretched out with banding wherever there should be black pixels. It's fuzzed horizontally a few pixels. Also, if I ever try to set the foreground color for this bitmap window, the bitmap does not draw on a 4-bit device, or it draws pink on an 8-bit device. Terry I wrote: > I'm creating a window with WinCreateBitmapWindow and a 1-bit bitmap created > with BmpCreate and a nil colortable. Then I draw a 1-bit bitmap read from a > database into that offscreen window. Later I transfer the offscreen window > to the display. > > This works fine on devices that are black and white. It does not work fine > on devices that are natively gray or color. It will: (1) Draw garbled > looking bitmaps -- you can see a resemblance, it's not just noise, but is > garbled. (2) If I call WinDrawRectangle, nothing draws after that -- or at > least, nothing transfers back to the display window. (3) Sometimes, not > always, I get a crash during WinCopyRectangle in a function named (something > sort of like) PrvMisalignBlt.... > > If I make the window's bitmap 2 or more bits deep, everything works fine. > Or, like I said, if it's on a device with a native 1-bit display, it works. > > Does anyone know what the problem is? > > Is there a rule like: never make a window with a 1-bit bitmap on a device > with greater than 1-bit display? Or what's the rule I'm breaking? I'm > doing lots of other bitmap manipulations and I want to know so I don't break > the rule somewhere else. -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
