> Right, that'd do it. Ok, then anyone want to give me a way to display a
> standard bitmap without it being rescaled on OS/5 and without creating a
V3
> bitmap from it then?

you can use BITMAPFAMILYEX to support os5 double density.

however, sometimes it's more handy to convert the bitmaps at runtime. for
example if you already have bitmaps for sony hires and dont want to waste
extra space, you can create v3 bitmaps. they sometimes don't display
correctly when compressed, so you simply have to uncompress them before
using them. that doesnt work that fine either, so a workaround is to create
a generic offscreen window, draw your bitmap there using standard density
and then create a v3 bitmap from the offscreen's bitmap. here's some code:

case BMP_TYPE_OS5DD:
{
    Err error;
    BitmapType *bmpx;
    BitmapType *bmp3;

    WinHandle offscreen = WinCreateOffscreenWindow(44, 46, genericFormat,
&error);
    WinHandle onscreen = WinSetDrawWindow(offscreen);

    WinDrawBitmap(bmp, 0, 0);

    bmpx = WinGetBitmap(offscreen);

    bmp3 = (BitmapType*)BmpCreateBitmapV3(bmpx, kDensityDouble,
BmpGetBits(bmpx), NULL);
    WinSetDrawWindow(onscreen);

    WinDrawBitmap(bmp3, cx/2, cy/2);
    BmpDelete(bmp3);

    WinDeleteWindow(offscreen, true);
}

markus dresch (www.palmside.com)



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

Reply via email to