Hi All-
I'm having a little problem with some bitmap code I hope someone can
help me out with. Here's the scenario: I allow the user to draw some
info on the screen, ala scribble. Then I want to save this bitmap for
later use. Since I don't give the user any colored drawing tools, I
figure I'll just save it as a 1-bit bitmap. I figure this will be
simple, just create a 1-bit bitmap, copy the screen into it, and save
it.
Well, my code works so long as the offscreen bitmap I create is the same
number of pixels as my screen, but if I go lower, the bitmap header is
saved, but not the data.
Here's the simplest code snippet I've broken it down too:
Err error;
BitmapPtr bmp;
WinHandle wh;
RectangleType bounds;
WinGetWindowBounds(&bounds);
bmp = BmpCreate(160, 160, 4, NULL, &error);
wh = WinCreateBitmapWindow(bmp, &error);
WinCopyRectangle(NULL, wh, &bounds, 0, 0, winPaint);
WinDeleteWindow(wh, false);
WinDrawBitmap(bmp, 0, 0);
BmpDelete(bmp);
WinCopyRectangle only seems to work right if the two windows are of the
same bit depth. This is a simplified example, I don't really want the
entire window, just a small area where the user can make notations.
I've tried this with a color rom, color debug rom, and IIIxe rom.
Any suggestions?
-Ted
[EMAIL PROTECTED]
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/tech/support/forums/