At 12:04 AM 5/25/2004, you wrote:
Hello All,

I want to display 64 small bitmaps in a Gadget. User can assign any one of
the 64 icons for each record that he is entering through my application.
My previous version had 64 Bitmap Families. Each bitmap family had 3 bitmap
resource (4-bit,8-bit & 16-bit). So totally 192 bitmap resources. Now the
PRC file size is blown to 495 KB. I am intend to reduce prc size.

I combined all the 64 icons as one single bitmap resource and I am drawing
that on my Gadget. So I have only 3 bitmap resource (4-bit,8-bit & 16-bit)

Question:
When I want to show an icon assigned to a record, how do I clip that icon
alone from this large bitmap??

Would wincopyrectangle be of any help??

It sounds like what you want. Just load the bitmap, make a bitmap window, and use WinCopyRectangle to copy specific icons from the bitmap.


I'd suggest making your bitmap a 1x64 strip, with the icons oriented vertically. That seems faster to copy, since data for a since icon will be adjacent in memory. Orienting the bitmap any other way means the copy routine has to jump around more in the memory buffer. It also means you could potentially optimize things by doing your own bitmap copy from a raw bitmap to a local bitmap buffer.


-- Ben Combee, DTS technical lead, PalmSource, Inc. Read "Combee on Palm OS" at http://palmos.combee.net/



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

Reply via email to