Hi,
I keep posting this in the hope that someone will know what the problem
might be. Another post to keep my hopes floating :-)
I'm getting a strange problem, and till now I've got this only in the Palm
Vx (OS 3.5) and this is not reproducible on any other device or ROM, I've
tested on IIIc, Clie, Palm V, Handspring Visor..., etc.
I have a 1 bit Bitmap, and I create an offscreen window from it using
WinCreateBitmapWindow. Since the offscreen 1 bit bitmap is larger than the
screen width, I draw portions of this bitmap onto the screen. The draw
window has a screen depth of 4 bits, so essentially the WinCopyRectangle
that I'm using is blitting from a 1 bit window to a 4 bit window.
eg.: RectangleType rect = { x, y, width, height };
WinCopyRectangle( hImgWnd, drawWnd, &rect, 0, 0, winPaint);
The problem is everything happens smoothly if the (x, y) coordinates I give
for copying from the source window has an x value less than 64. However, if
I say copy from (64 or 64+, 0) to the draw window, I get a weird output.
>From the output it is evident that WinCopyRectangle has assumed the source
window to be of 4 bit depth (instead of 1 bit), since the output image is a
shrinked version, I've experimented with setting the screen depth to 2, in
this case the shrink is less, however the problem still occurs. The problem
disappears if the screen depth is set to 1.
More strange is the fact that this doesn't happen all the time, it is more
pronounced if I reset the device or the emulator and then try. However, it
is erratic in the sense that I get a correct output many a times.
Please shed some light if you can and write back if you need any
clarifications.
Thanks,
-vc
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/tech/support/forums/