PATCH/RFC: imagelist rewrite to use N x M grid

Vitaliy Margolen wine-devel at kievinfo.com
Tue Nov 29 14:24:47 CST 2005


Tuesday, November 29, 2005, 12:58:55 PM, Marcus Meissner wrote:
> On Mon, Nov 28, 2005 at 09:55:57PM -0600, Dustin Navea wrote:
>> Hmmmm.  I havent tested due to sys overhaul, but it seems that this 
>> should work.  Just out of curiosity, what was the reason for picking 4
>> as the magic number?

> Randomness. Any number could be used.
I think native uses 4. As I remember, Delphi understands only 4xN.
So when you edit an imagelist in IDE and save it, Delphi could not use
produced output and was crashing/displaying corrupted images.

> However I got another suggestion to just store all the images in
> an array (of HBITMAP or similar).
>
> Does anything speak against doing this instead of having this 
> large bitmap and cutting out the images?

The problem is that you can't read it as-is from the stream. Also you
will have to put it back together into a single bitmap to save it. Also
some ops require operation on the whole image list. And last but not
least, it will be much slower, as you will have to create/delete DCs each
time you need to use imagelist.

Vitaliy








More information about the wine-devel mailing list