Changeset 44

Show
Ignore:
Timestamp:
03/04/08 09:52:02 (6 months ago)
Author:
Chris Miller
Message:

Image list creation.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/win32/dfl/imagelist.d

    r42 r44  
    272272        } 
    273273         
    274         UINT flags = 0
     274        UINT flags = ILC_MASK
    275275        switch(_depth) 
    276276        { 
    277             case ColorDepth.DEPTH_4BIT: flags = ILC_COLOR4; break; 
    278             default: case ColorDepth.DEPTH_8BIT: flags = ILC_COLOR8; break; 
    279             case ColorDepth.DEPTH_16BIT: flags = ILC_COLOR16; break; 
    280             case ColorDepth.DEPTH_24BIT: flags = ILC_COLOR24; break; 
    281             case ColorDepth.DEPTH_32BIT: flags = ILC_COLOR32; break; 
    282         } 
    283         flags |= _depth; 
    284         flags |= ILC_MASK; // ? 
     277            case ColorDepth.DEPTH_4BIT:          flags |= ILC_COLOR4;  break; 
     278            default: case ColorDepth.DEPTH_8BIT: flags |= ILC_COLOR8;  break; 
     279            case ColorDepth.DEPTH_16BIT:         flags |= ILC_COLOR16; break; 
     280            case ColorDepth.DEPTH_24BIT:         flags |= ILC_COLOR24; break; 
     281            case ColorDepth.DEPTH_32BIT:         flags |= ILC_COLOR32; break; 
     282        } 
    285283         
    286284        // Note: cGrow is not a limit, but how many images to preallocate each grow. 
    287         _hil = ImageList_Create(_w, _h, flags, _cimages._images.length, 8 + _cimages._images.length / 4); 
     285        _hil = ImageList_Create(_w, _h, flags, _cimages._images.length, 4 + _cimages._images.length / 4); 
    288286        if(!_hil) 
    289287            throw new Exception("Unable to create image list");