projects
/
wxWidgets.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
edf8e8e
)
use DIB, not DDB, when converting from an image with alpha channel
author
Vadim Zeitlin
<vadim@wxwidgets.org>
Fri, 9 May 2003 23:54:16 +0000
(23:54 +0000)
committer
Vadim Zeitlin
<vadim@wxwidgets.org>
Fri, 9 May 2003 23:54:16 +0000
(23:54 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@20570
c3d73ce0
-8a6f-49c7-b76d-
6d57e0e08775
src/msw/bitmap.cpp
patch
|
blob
|
blame
|
history
diff --git
a/src/msw/bitmap.cpp
b/src/msw/bitmap.cpp
index 039c3b8e9350af3aa7ce467ff3b5ef96953729c4..dd6423fff72696176bd3e717ae3b81adafac0fad 100644
(file)
--- a/
src/msw/bitmap.cpp
+++ b/
src/msw/bitmap.cpp
@@
-790,7
+790,9
@@
bool wxBitmap::CreateFromImage(const wxImage& image, int depth, WXHDC hdc )
HBITMAP hbitmap;
// are we going to use DIB?
- if ( wxShouldCreateDIB(w, h, depth, hdc) )
+ //
+ // NB: DDBs don't support alpha so if we have alpha channel we must use DIB
+ if ( image.HasAlpha() || wxShouldCreateDIB(w, h, depth, hdc) )
{
// don't delete the DIB section in dib object dtor
hbitmap = dib.Detach();