> I see what you mean, and it does make sense. But I don't understand some
> things, they did'nt noted in the palmos docs. Does BmpCreateV3 take bits as
> is and save the references to it in the header or does it create a full copy
> of the bits data. First case proves your words from another aspect, but if
> the latter and I create 1bpp bitmap, maybe there's a kind of transformation
> of just a bug in PalmOS 5 implementation. I suppose I might did something
> wrong in the code, but there were strange things. Let me explain the
> details.

you create a normal bitmap using BmpCreate(), that said - it creates
the right size, so 320x320x1 = 12800 bytes. when you call BmpCreateV3
you must provide the bitmap/data to that routine, as, that is exactly
the data it will use. BmpCreateV3 is actually just a wrapper library
that sets V3 specific information in the bitmap headers. :)

> - I have working code, that uses Sony HR Library. I know they made not 
> so convinent library to use, but anyway. There is a HRBmpCreate, I use
> 320x320x1bpp format. We get 12800 bytes in this case, so we need no 
> segment complexities. I use HRWinCreateBitmapWindow to create an 
> offscreen windows based on this bitmap. Later I don't need to use
> this library since the pair WinGetBitmap/BmpGetBits works properly.

you will always have to have different code for Sony HR and Palm HDD.
there is no compatibility between them at all - except for the underlying
bits. you need to use *BOTH* API's. see below.

> - When I add code to support High-Density, I change HRBmpCreate to simple
> BmpCreate, add BmpCreateBitmapV3 to work with a high-density bitmap. The
> "WinGetBitmap/BmpGetBits" pair stays unchanged (except it and moreover it
> gives me non-NULL results. But working with this bits leads to leaving
> Simulator.
>
> So the question is: Can i count on calculating "320x320x1bpp = 12800 bytes"
> in the case of High-Density bitmaps?

yes.

CREATION:
// SONY     --> HRBmpCreate
                HRWinCreateBitmapWindow
// PALM HDD --> BmpCreate
                BmpCreateBitmapV3
                WinCreateBitmapWindow
// PALM old --> BmpCreate
                WinCreateBitmapWindow

DRAWING:
// SONY     --> HRWinCopyRectangle
// PALM all --> WinCopyRectangle

you only need to use the HR* routines on pre OS5 devices; as, the V3 bitmaps
were added with OS5. there were many sony devices with OS4, and, you still
could do high res, but, using the HR* routines.

---
Aaron Ardiri
[EMAIL PROTECTED]
http://www.mobilewizardry.com/members/aaron_ardiri.php [profile]

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

Reply via email to