>
>
>   i also recall (my memory could be fading) that if you used a
>   compressed bitmap - it could not be larger than 160x160 :)

nope, no compressed bitmaps are being used.


>  > should I be trying to draw to the offscreen window using direct
>>  buffer access? if so, how?
>
>   i dont know enough about your desires.. hence, i cannot answer
>   your question :)


here is what I am trying:


void DrawBitmap(UInt16 bitmapID, Int16 x, Int16 y)
{
        VoidHand                bitmapH;
        BitmapPtr       bitmapP;

        WinHandle       newOffScreenDrawWinH;
        WinHandle       oldDrawWinH;

        UInt16          error;
        RectangleType   rect, viewRect;


        bitmapH = DmGet1Resource(bitmapRsc, bitmapID);
        oldDrawWinH = WinGetDrawWindow();
        error = 0;

        //src rect
        rect.topLeft.x = x;
        rect.topLeft.y = y;
        rect.extent.x = 158;
        rect.extent.y = 111;

        //target rect
        viewRect.topLeft.x = 1;
        viewRect.topLeft.y = 30;
        viewRect.extent.x = 158;
        viewRect.extent.y = 111;

        if(bitmapH) {
                bitmapP = MemHandleLock(bitmapH);

                newOffScreenDrawWinH = 
WinCreateOffscreenWindow(bitmapP->width,bitmapP->height, 
screenFormat, &error);

                ErrFatalDisplayIf(error, "Error offscreenwin");
        }

        WinSetDrawWindow (newOffScreenDrawWinH);


        ---this is where 3.0,3.1,3.2 crashes---
        WinDrawBitmap(bitmapP, 0, 0);



        WinSetDrawWindow (oldDrawWinH);
        WinCopyRectangle(newOffScreenDrawWinH, oldDrawWinH, &rect, 1, 
30, winPaint);


        MemPtrUnlock(bitmapP);
        DmReleaseResource(bitmapH);

        WinDeleteWindow(newOffScreenDrawWinH,true);
}

-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/tech/support/forums/

Reply via email to