[Mono-dev] ImageList patches r51171 and r51889 are not compatible with MS.NET behaviour
Kornél Pál
kornelpal at hotmail.com
Wed Oct 19 05:10:26 EDT 2005
Hi,
MS.NET ImageList creates handle when you first time retrieve or draw any of
it's images. Until that is stores the original image object, after handle
creation it uses a native ImageList. It applies size and color depth when
handle is created. (This is documented in ImageList.cs.)
After handle is created modifying ColorDepth or ImageSize results in handle
recreation and the loss of all images.
As we don't create any handle at all I decided to create it when images are
added and apply size and colordepth when handle is created in other words
when they are added.
Patches r51171 and r51889 are not compatible with MS.NET behaviour as they
don't clear images after handle was created so these modifications should
not be preserved.
I belive that caching the images until using them is a bad idea as we don't
use any native image list and doing time consuming operations at
initializaion is better as if you create an ImageList you do it because you
want to access the images.
If you think caching before handle creation behaviour is important after
considering the above things please let me know and I will implement that
behaviour.
Kornél
More information about the Mono-devel-list
mailing list