]> git.saurik.com Git - wxWidgets.git/commit
Fix creation of wxBitmap from wxIcon in wxMSW: premultiply the pixels.
authorVadim Zeitlin <vadim@wxwidgets.org>
Wed, 9 May 2012 14:24:12 +0000 (14:24 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Wed, 9 May 2012 14:24:12 +0000 (14:24 +0000)
commit2c2138e9374cbf7b5ee7c0659baf948740dc9d8b
tree2cad23f3722671f4e51da999cc8b43e9af6b5ab1
parent39d169639b01d4902583d4e541746a93a156ab78
Fix creation of wxBitmap from wxIcon in wxMSW: premultiply the pixels.

wxBitmap in wxMSW is supposed to store its data in alpha-premultiplied format
but didn't do it when it was created from an icon (or a cursor), resulting in
wrong display of wxIcons with alpha channel when they were used for e.g. menu
items.

Fix this by ensuring that the data is always premultiplied. This is not the
best solution as in some cases (e.g. if this wxBitmap is added to wxImageList
later) we could need to undo this premultiplication later which is quite
inefficient but at least it's simple and straightforward.

Closes #11414.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71385 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
src/msw/bitmap.cpp