--- In [EMAIL PROTECTED], Regis Nicolas <[EMAIL PROTECTED]> wrote:
> Zane,
> 
> I am almost sure that there is something is the OS which forces the
> need for a d1 bitmap but I can't remember. I guess I should check.
> That's the reason why I put this warning in PilRC (because _I_ (and
> Renaud) know the pain it has been :-) to add HDB to pilrc)

I'm sure it WAS a pain. Please double-check on this limitation. You may
be right, but my man at Palm wasn't aware of it.

If you CAN produce a d2 bitmap alone (if the OS will allow it), you
should give us that ability. If the OS really doesn't allow it, I
understand your warning and I'll have to use my dummy trick. (Which I've
been using thus far.)


> Your trick (using dummy) would work but you app would not produce the
> expected result on a non HiRes device, since the OS would display the
> dummy one.

My need for this is to create a resource that would only be accessed in
the case of a double-density device. (Thus the dummy with never be
accessed at all. Thus my desire to not need a dummy at all to create a
double-density bitmap resource by itself.)

For example, if a bitmap is too large in the double density case to be
included in a single resource, then I have to split half of it into
another resource....

My code might be:
DrawBitmapResourceToScreen(resid, 0, 0); // resid, x, y
if (doubledensity) DrawBitmapResourceToScreen(resid+100, 160, 0);

...or some such. In this case, the doubledensity variable is set at
start-up, and the original "resid" resource only contains the left half
of the original bitmap, with the "resid+100" holding the right half of
the image. Note that this limitation can either happen because a bitmap
that is double-density is 4x "larger" (and can thus exceed the 64K limit
all by itself) OR because the addition of a double-density bitmap might
force the FAMILY to exceed the 64K limit, in which case I might need to
put the entire double-density bitmap in its own resource regardless.

Yes, this makes coding for double-density less OS-automatic, and more
dependent on my code knowing whether I want the "normal" density
resource or the double-density resource, BUT with real 64K limits
around, it is often the only choice.

In the simple case of buttons and small bitmaps, the family concept is a
great one. But as your bitmaps get larger (and with double-density they
quickly do), that 64K thing quickly gets in the way.

Thanks,
zane
-----
r. zane rutledge - http://www.rzanerutledge.com/palm/

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

Reply via email to