>I can't answer how to do it for PalmOS 3.5.  Yet.

In 3.5 there are APIs to create bitmaps and draw into them however you
like.  See the bitmap manager in the 3.5 docs... or here's some (untested)
code that you can use in 3.5 to replace that huge ugly routine in the
Signature sample code project, which returns a new bitmap containing a copy
of a section of the screen.


static BitmapPtr GetSignatureBitmap( RectangleType* theBoundsPtr )
{
    WinHandle    theWindowHandle;
    UInt16       theError;
    BitmapPtr    theBitmapPtr = NULL;

    theBitmapPtr = BmpCreate(theBoundsPtr->extent.x,
theBoundsPtr->extent.y, 1, 0, &theError);
    if (theError)
        return 0;

    theWindowHandle = WinCreateBitmapWindow(theBitmapPtr, &theError);
    if (theError) {
        BmpDelete(theBitmapPtr);
        return 0;
    }

    WinCopyRectangle(WinGetDrawWindow(), theWindowHandle, theBoundsPtr, 0,
0, scrCopy);
    WinDeleteWindow(theWindowHandle, 0);

    return theBitmapPtr;
}


-David Fedor
Palm Developer Support


Reply via email to