Don't convert any non-monochrome wxBitmap to ARGB format
While selecting wxBitmap with colour depth > 1 bpp into wxMemoryDC there is no need to convert its format to ARGB regardless of the current interpretation of the alpha channel values in the bitmap. If original bitmap was marked as a RGB one (with alpha channel being ignored), it should retain this format to avoid confusions. Closes #16309.
This commit is contained in:
parent
77d7d3a014
commit
8dc4bd40a8
2 changed files with 1 additions and 2 deletions
|
|
@ -228,6 +228,7 @@ wxOSX:
|
|||
- Implement wxTextCtrl::ShowPosition().
|
||||
- Add support for wxTE_NO_VSCROLL style to wxTextCtrl.
|
||||
- Add support for wxTE_CHARWRAP style to wxTextCtrl.
|
||||
- Fix selecting RGB bitmaps (with no alpha channel) into wxMemoryDC.
|
||||
|
||||
Unix:
|
||||
|
||||
|
|
|
|||
|
|
@ -72,8 +72,6 @@ void wxMemoryDCImpl::DoSelect( const wxBitmap& bitmap )
|
|||
m_selected = bitmap;
|
||||
if (m_selected.IsOk())
|
||||
{
|
||||
if ( m_selected.GetDepth() != 1 )
|
||||
m_selected.UseAlpha() ;
|
||||
m_selected.BeginRawAccess() ;
|
||||
m_width = bitmap.GetScaledWidth();
|
||||
m_height = bitmap.GetScaledHeight();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue